learn tkinter code example
Example 1: how to create a tkinter window
from tkinter import *
new_window = Tk()
new_window.title("My Python Project")
new_window.geometry("200x150")
new_window.configure(bg = "red")
new_window.mainloop()
Example 2: basic tkinter gui
import tkinter as tk
root = tk.Tk()
root.title("my title")
root.geometry('200x150')
root.configure(background='black')
root.mainloop()
Example 3: tkinter python tutorial
button = tk.Button(
text="Click me!",
width=25,
height=5,
bg="blue",
fg="yellow",
)
Example 4: how to create tkinter window
import tkinter
master = tkinter.Tk()
master.mainloop()