What is TKinter ? Create a GUI using Tkinter that displays ‘‘Hello World’’

message in the window. Discuss the execution of lines of code written by you

TKinter is a Python library that is used to create GUI (Graphical User Interface) applications. It provides various tools and widgets to design and develop interactive windows, buttons, menus, text boxes, and other elements in a user-friendly manner.

Here is an example code for creating a GUI using Tkinter that displays the message "Hello World" in a window:

```python
import tkinter as tk

# Create the main window
window = tk.Tk()

# Create a label widget and set its properties
label = tk.Label(window, text="Hello World!")

# Pack the label widget to display it in the window
label.pack()

# Run the main event loop of Tkinter
window.mainloop()
```

Now, let's discuss the execution of the code:

1. First, we import the `tkinter` module as `tk` for convenience.
2. We create the main window of the application using the `Tk()` constructor and assign it to the `window` variable.
3. The `Label` widget is created with the text "Hello World!" and assigned to the `label` variable.
4. The `pack()` method is called on the `label` widget. This method organizes the widget in the window, making it visible.
5. Finally, the `mainloop()` method is executed on the `window` object. This starts the main event loop, allowing the window to respond to user interactions and remain active until closed.

When you run this code, a new window will open with the label "Hello World!" displayed. The window will remain open until it is closed by the user.