1#tested and working on PYTHON 3.8 AND ADDED TO PATH
2import tkinter as tk
3win = tk.Tk()
4
5def changetext():
6 a.config(text="changed text!")
7
8a = tk.Label(win, text="hello world")
9a.pack()
10tk.Button(win, text="Change Label Text", command=changetext).pack()
11
12win.mainloop()