tkinter mainloop

from tkinter import*

root=Tk()

root.mainloop

Here is what the above code is Doing:
1. We are creating a Tk object.
2. We are calling the mainloop method on the Tk object.

The mainloop method is an infinite loop that is used to run the application, wait for an event to occur and process the event till the window is not closed.