Skip to content

Instantly share code, notes, and snippets.

@sbassi
Created September 26, 2021 23:11
Show Gist options
  • Save sbassi/a468bc1097b2f4a196addf5fcf03c2c3 to your computer and use it in GitHub Desktop.
Save sbassi/a468bc1097b2f4a196addf5fcf03c2c3 to your computer and use it in GitHub Desktop.
def get_user_input(options):
user_input = ''
while user_input not in options and user_input != 'quit':
user_input = input("Enter your option (or 'quit' to exit): ")
return user_input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment