Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def read_input(message):
- # valid only takes input that has been converted to lower case
- valid = {"yes": True, "y": True, "no": False, "n": False}
- response = input(message + "? [Y/n]\n")
- return(valid[response.lower()])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement