Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- used_words = []
- while True:
- word = input("Type 4 letter word: ")
- if len(word) == 4 and word not in used_words:
- used_words.append(word)
- print("good job, try another word")
- elif word in used_words:
- print("word already exists")
- elif len(word) != 4:
- print("word is not 4 letters long")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement