Skip to content

Instantly share code, notes, and snippets.

@bharadwaj-raju
Created March 16, 2017 05:12
Show Gist options
  • Save bharadwaj-raju/4822d654d5fbb7ffb47b49dbbcf0d9a4 to your computer and use it in GitHub Desktop.
Save bharadwaj-raju/4822d654d5fbb7ffb47b49dbbcf0d9a4 to your computer and use it in GitHub Desktop.
Python program loop
import sys
while True:
# code here
print('Do you want to start the program again? (Y/N)')
response = input('> ').strip().upper()
if response == 'Y':
pass
else:
sys.exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment