+ 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')
5 odpowiedzi
+ 4
s=input()
t=set(s)
if len(s)==len(t):
print("Unique")
else:
print("Deja Vu")
+ 2
Ayush Rastogi
Thnx bro
I want code in this manner
+ 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.
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))