while input("Do You Want To Continue? [y/n]") == "y": # do something print("doing something")
while True: # some code here if input('Do You Want To Continue? ') != 'y': break