while True:
    if start != 1:
        do_run = input('Restart?  y/n:')
if do_run == 'y':
    pass
elif do_run == 'n':
    break
else:
    print('Invalid input')
continue
print('Doing stuff!!!')
if start == 1:
    start = 0
How do I restart a program based on user input?