def isuniq(string1):
uchars=set()
for c in string1:
if c in uchars:
return False
else:
uchars.add(c)
return True
print isuniq('parag')
uchars=set()
for c in string1:
if c in uchars:
return False
else:
uchars.add(c)
return True
print isuniq('parag')
No comments:
Post a Comment