This sets the condition of x for later use x=0 # This is the main part of the ... You don't seem to need the variable x while True: numtest() again = input("Run again?
stackoverflow.com