How to find unique words using python programming?
words = list()
print('Enter words:')
while True:
word = input().strip().lower()
if 0 == len(word):
break
if word not in words:
words.append(word)
if words:
print('Unique words given:')
for word in words:
print(word)
else:
print('No words given')
Download
Comments
Post a Comment