from tkinter import* root=Tk() root.mainloop
def task(): # do something root.update() while 1: task()
from tkinter import* window = Tk() window.title("Main loop") window.mainloop()