SHARE
TWEET

Untitled

a guest Aug 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def main():
  2.     used_words = []
  3.     while True:
  4.         word = input("Type 4 letter word: ")
  5.         if len(word) == 4 and word not in used_words:
  6.             used_words.append(word)
  7.             print("good job, try another word")
  8.         elif word in used_words:
  9.             print("word already exists")
  10.         elif len(word) != 4:
  11.             print("word is not 4 letters long")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top