This should do the job:
import time, sys
for i in range(10):
print('bla')
sys.stdout.flush()
time.sleep(5)
As Python will buffer the stdout by default, here i have used sys.stdout.flush() to flush the buffer.
Another solution would be to use the -u(unbuffered) switch of python. So, the following will do too:
python -u script.py >> log