0
(Python)Why this doesnt work
''' Instead writing one letter at the time the program waits the sum of all letters and then prints out the word. How do I fix this? ''' from time import sleep text = "Hello world" for i in text: print(i, end="") sleep(1)
3 Respuestas
+ 1
I found the solution on stockoverflow, all I ahd to do is to write:
print(i, end = "", flush = True)
0
It's hard to say how you'd fix this without knowing where you're running it.
For example, maybe the place you're running it waits for your program to finish (terminate) before showing output.
I assume you're not running it here, because 11 seconds will always exceed the time limit.
0
Kirk Schafer. I use Atom text editor with installed python IDE and I had issue both there and in sololearn editor. But then i tryed on original python IDLE it worked out. Is there any solution to fix thin on Atom?