import time import sys sys.stdout.write(\"1\") time.sleep(5) print(\"2\")
will print \"12\" after 5 seconds
import time import sys
Consider that when you type a command into a computer, it doesn't know you're finished until you press ENTER
Similarly, the newline tells Python you've finished that line.