0
How could I simplify my code
https://code.sololearn.com/c7iI3t568VRw/?ref=app This was for deja vu in code coach Ajith
3 Answers
+ 6
This could be the simplest way ig
https://code.sololearn.com/c2mMDtrlEnoQ/?ref=app
+ 2
smiley
string=list(input())
print('Unique') if len(string)==len(set(string)) else print('Deja Vu')
hope this concept will help you to simplify your code
+ 1
Well, this is what I came up with. Hope it helps.
str = input()
lst = []
bool = True
for letters in str:
if letters not in lst:
lst.append(letters)
else:
bool = 'False'
if bool == True:
print('Unique')
else:
print('Deja Vu')
P.S. - Python definitely makes a code a lot easier and shorter :)