Created
March 16, 2017 05:12
-
-
Save bharadwaj-raju/4822d654d5fbb7ffb47b49dbbcf0d9a4 to your computer and use it in GitHub Desktop.
Python program loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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