I'm coding a big project that has many functions. I want my code to restart functions where errors occur due to user input, to illustrate what I mean I have made this short code:
def myfunction():
UserInput = int(input("Enter 1 or 2"))
if UserInput == 1:
print("hello")
elif UserInput == 2:
print("Bye")
else:
print("Error!, Please choose 1 or 2")
#I want it to restart myfunction()
thanks.