+ 1

Plz help me to improve my Deja Vu code....!

word=input() j=word[i] for j in word: while word.count(j)==1: i+=1 print('Unique') else: print('Deja Vu')

4th Aug 2020, 6:36 AM
Jayendra Todawat
Jayendra Todawat - avatar
5 Réponses
+ 4
s=input() t=set(s) if len(s)==len(t): print("Unique") else: print("Deja Vu")
4th Aug 2020, 6:54 PM
Suhail KM
+ 2
~ swim ~ Thnx but I have not coverd function part yet in python. So plz give me solution using coditional statements
4th Aug 2020, 7:13 AM
Jayendra Todawat
Jayendra Todawat - avatar
+ 2
Ayush Rastogi Thnx bro I want code in this manner
4th Aug 2020, 1:21 PM
Jayendra Todawat
Jayendra Todawat - avatar
+ 1
s=input() c=0 x=0 for i in range(len(s)): ch=s[i] for j in range(len(s)): if s[j]==ch: c+=1 if c>=2 : x+=1 c=0 if x>=1: print("Deja Vu") else: print("Unique") Short and Simple.
4th Aug 2020, 1:02 PM
Ayush Rastogi
Ayush Rastogi - avatar
0
You can Write down like this in easiest way! word = input() def deja(word): for i in word : if word.count(i)>1: return 'Deja Vu' return 'Unique' print(deja(word))
19th Sep 2020, 7:54 AM
Jahir Raihan Joy
Jahir Raihan Joy - avatar