# -*- coding: utf-8 -*- import tkinter as tk root = tk.Tk() root.title("tk5.py") root.geometry("100x100") ##################################### def hello(): lb.config(text = 'Hello!') btn = tk.Button(root, text = "Hello", \ borderwidth = 10, bg = '#0000ff', \ fg = 'yellow', command = hello) lb = tk.Label(root, text = 'A Label', fg = 'darkgreen') btn.pack() lb.pack() ##################################### root.mainloop()