Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state=input("Name a US state")
- file = open("states.txt", "r")
- temp=file.readlines()
- states=[]
- for word in temp:
- states.append(word.rstrip("\n"))
- if state in states:
- print("Correct!")
- else:
- print("Incorrect!")
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement