New example - execution order broken because of unflushed output buffer

On running the following script -

import time

print('hey', end='')
time.sleep(3)

hey prints after the delay, which is surprising at the first sight.

Because of end='', the output buffer remains unflushed, and Python waits for the program to finish, before printing anything to the console.