With the Help of Tkinter, I am trying to print a single word at a time(with an interval of 2-sec sleep) I tried the following code, It doesn't work as I want it to do. My code is printing the whole string stacked upon one another.
After n*len(words) sleep seconds are passed.
I am trying to print ONLY one word at a time(with an interval of 2-sec)
from tkinter import *
from time import sleep
root = Tk()
words = 'Hey there, This is python3'.split()
l = Label(root, text='')
for w in range(len(words)):
sleep(2)
l = Label(root,text = words[w])
#l['text'] = words[w] # this is what I tried
l.pack()
root.mainloop()
I tried above-commented statement, thought this might update but didn't work at all as I expected.