The code i tried to accomplish my result:
from tkinter import* import time root=Tk() lyrics=StringVar() lyrics.set("unleash") l=Label(root,textvariable=lyrics) l.pack() def change_text(): lyrics.set("you!!") print('ses') time.sleep(6.9) change_text() mainloop()
The problems in this are like the window is displayed after 10 sec. If I shift the mainloop()
before the time.sleep()
function the time.sleep()
executes after the app is closed. The reason is simple that I didn't use after() function because the after()
function doesn't accepts the sec value in decimal.
Any help is appreciated