enable label on click tkinter code example

Example 1: Update label text after pressing a button in Tkinter

#tested and working on PYTHON 3.8 AND ADDED TO PATH
import tkinter as tk
win = tk.Tk()

def changetext():
	a.config(text="changed text!")
    
a = tk.Label(win, text="hello world")
a.pack()
tk.Button(win, text="Change Label Text", command=changetext).pack()

win.mainloop()

Example 2: make tkinter label and input

there was 2 "=" here V you only need one
example3 = Entry(root, width=10, font="Calibri 10")
example4 = Label(root, width=10, font="Calibri 10")