When I press the “Show” button using the code below, nothing happens for 3 seconds and then both “Building” and “Done!” appear on top of each other. How do I make it so that “Building” is displayed for 3 seconds and then replaced by “Done!”
Thanks
import tkinter
from tkinter import *
import time
window = Tk()
window.geometry(“200x200”)
def bar():
mylabel = Label(window, text=‘Building’, fg=‘blue’)
mylabel.place(x=0,y=0)
time.sleep(3)
mylabel2 = Label(window, text=‘Done!’, fg=‘blue’)
mylabel2.place(x=0,y=0)
button_show = Button(window, text = “Show”, command = bar)
button_show.pack()