Tkinter Entry

  • Post category:Tkinter

In this Tkinter tutorial, you will learn how to add Tkinter Entry.

# import Tkinter Module
import tkinter as tk

# create main window
var = tk.Tk()

# Set title
var.title("My Tkinter")

# create an entry
var2 = tk.Entry(var)

# pack entry
var2.pack()

# start the event loop
var.mainloop()

Output:

Free resources to learn advanced skills: AiHints and CodeAllow