Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.