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

Popular posts from this blog

Tecq Mate | Build APK with command line only | Build Android with cmd | No IDE | No Android Studio