I want to make a program which outputs the text as if it is typed live. For that, I am printing a word and waiting for 0.2 seconds and then other.
I have saw this website: https://www.tutorialspoint.com/how-to-print-in-same-line-in-python But the thing is print() keeps on collecting the characters that are to be printed and then flush them after the loop is over. So I am not able to get the result that I want.
This is the code:
import time
time.sleep(2)
welcome = "Welcome. We will plot a graph in this program"
for i in range(len(welcome)):
time.sleep(0.2)
print(welcome[i], end="")
Please help me. Thanks.