Deja Vu bug
I have made two solution to the problem the first one works fine but the other one is creating problem, it is always printing "Deja Vu" . Pls help me find the bug. https://code.sololearn.com/cjN4V5ngczDm/?ref=app
set does not maintain the order so list(set(listt) ) will not maintain elements order as it is in listt. *May not same as list values in order even when have same values. So may return false mostly.
we don't need to care about the order of a set, if we compare the length of the original input and the length of a set of the original input. converting a string to a set will remove all duplicated characters. word = input() if len(word) == len(set(word)): print('Unique') else: print('Deja Vu')
Lothar thanks, that was a great use of "len()"
Jayakrishna🇮🇳 thankyou so much
Free month of PRO subscription
Please help me with HTML
Hash in python
Unable to overload +
Package of the Java
What is the mistake here?