这应该有帮助#request said user inputx= input("Please Press 1 to continue Or 2 to Exit")#use a While loopWhile True: #then an if statement if x==1: #call your function printit() else:break这应该可以解决