I have a problem with my python program, it is supposed to print each character individually with a delay in between. Here is my code:
import time
import os
txt=open("text",'r').read()
delay=0.25
bg,fg=0,2
os.system("color "+str(bg)+str(fg))
for i in txt:
print(i,end='')
time.sleep(delay)
But when run in cmd it waits until the program is done THEN shows the output. How can i make this work?
*the "text" file just contains "hello"