Skip to content

Instantly share code, notes, and snippets.

@EZonTheEyes
Created August 6, 2023 17:22
Show Gist options
  • Save EZonTheEyes/a7c51a199966c1b8ef7e1550ddf62735 to your computer and use it in GitHub Desktop.
Save EZonTheEyes/a7c51a199966c1b8ef7e1550ddf62735 to your computer and use it in GitHub Desktop.
Basic Python User Input Example - Personal Test
simplepass = ('y')
voidoperate = ('n')
proc = str(input("Proceed? (y/n): "))
while simplepass!= proc:
if proc == voidoperate:
print('Cancelling Operation.')
proc = str(input("Retry Operation? (y/n): "))
if proc != simplepass:
print('Unaccepted Key, Continue when ready. ')
proc = str(input('Proceed? (y/n): '))
else:
break
print('Proceeding with operation.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment