Skip to content

Instantly share code, notes, and snippets.

@jmquintana79
Last active July 28, 2025 11:44
Show Gist options
  • Save jmquintana79/b87e19111095d9cd2520c5f2f74c2785 to your computer and use it in GitHub Desktop.
Save jmquintana79/b87e19111095d9cd2520c5f2f74c2785 to your computer and use it in GitHub Desktop.
# pause and allow the selection between continue or stop
while True:
answer = input("Would you like to continue (C) or stop (S)? ").strip().lower()
if answer == 'c':
print("Continue...")
break
elif answer == 's':
print("Stop.")
exit()
else:
print("Not allowed answer.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment