How can I print a string using a while loop with an interval in between letters (on the same line) in Python 3.2?
问题 I am trying to print a string letter by letter (with a pause in between each print) onto the terminal screen and I want it to all be on the same line. I currently have this: sleepMode = "SLEEP MODE..." activ = "ACTIVATE!" for l in sleepMode: print(l, end=" ") sleep(0.1) sleep(2) for l in activ: print(l, end=" ") sleep(0.1) For some reason this doesn't sleep in between prints in the loop, rather it seems to wait until the loop is complete before printing all of it out at once. I want it to