1sys.stdout.flush()
2os.execl(sys.executable, 'python', __file__, *sys.argv[1:])
1import os
2
3while 1:
4 os.system("python main.py")
5 print "Restarting..."
6 exit()
1#our code
2var = input("Hi! I like cheese! Do you like cheese?").lower()
3if var == "yes":
4 print("That's awesome!")
5
6# using While True
7while True: # Will keep going untill told not to using 'break'
8 var = input("Hi! I like cheese! Do you like cheese?").lower()
9 if var == "yes":
10 print("That's awesome!")