I wanted to test if I could have some sort of slower writing option for a program I am building so I made this really simple script that prints a letter from a string with end = '' and then waits 0.2 seconds. I tried running it in the command prompt but instead of printing every letter with an interval it waits the whole duration (so 0.2 times the amount of letters) and then prints it all together.
I tried a few things including removing the end parameter and it works just fine without it. Then I tested running it in another environment (a Jupyter notebook) and it worked as it should.
import time
string = "hello world"
for i in string:
time.sleep(0.2)
print(i, end = '')
I expected it to print one letter, wait 0.2 seconds, then the next one and so on but it instead waits the whole duration and then everything together.