Advertisement
Guest User

Untitled

a guest
May 27th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. state=input("Name a US state")
  2. file = open("states.txt", "r")
  3. temp=file.readlines()
  4. states=[]
  5. for word in temp:
  6. states.append(word.rstrip("\n"))
  7. if state in states:
  8. print("Correct!")
  9. else:
  10. print("Incorrect!")
  11. file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement