The code I wrote here (I just assume) should print letters with a small amount of time between each letter, as if someone were typing:
from sys import stdout
from time import sleep
def timedPrint(string, time):
array = list(string)
for x in array:
stdout.write(x)
sleep(time)
timedPrint("test")
But for some reason, when I call the function, it waits for the time it takes for each character to print, then it prints the entire line ("test").
Is there any way to print it as I see fit?
source
share