Hey guys, i am a bit stuck with the following challenge on Python:
unique_characters() function that determines if any given
string has all unique characters (i.e. no character in the string is duplicated). If the
string has all unique characters, the function should return
True. If the string does not have all unique characters, return
unique_characters("apple") should return
I wrote my function in the following way, by using set():
if(len(set(string_in))==len(string_in)): return True else: return False
However, when i run the piece of code, only 4/5 tests are passed.
Does anyone have any idea what could be the problem here?