I have a very simple application:
import sys from time import sleep for i in range(3): sys.stdout.write('.') sleep(1) print('Welcome!')
I expect it to print dots every second (3 times), after which it should display "Welcome!". Unfortunately, it just waits three seconds and then prints everything all at once. I am on a Mac that runs regular Python 2.7, and I donβt know why this code behaves this way. Any suggestions?
source share