pyassistant

First non-repeating character in a string

Given a string s, return the first character that does not repeat anywhere in the string. If every character repeats or the string is empty, return an empty string. The comparison is case-sensitive ('a' and 'A' are different).

Example:

Input:
('stress',)
Output:
't'

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.