Skip to content

Instantly share code, notes, and snippets.

@SiAust
Last active July 22, 2018 10:20
Show Gist options
  • Save SiAust/487ded4015d948847f5baf935107a0ba to your computer and use it in GitHub Desktop.
Save SiAust/487ded4015d948847f5baf935107a0ba to your computer and use it in GitHub Desktop.
An interactive loop in python. Takes user input to exit the loop.
"""A short program using user input in an interactive loop"""
q = False
while not q:
user_quit = input('Quit?(y/n): ')
if user_quit == 'y':
q = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment