__future__ statements need to be near the top of the file because they change fundamental things about the language, and so the compiler needs to know about them from the beginning. From the documentation.
from __future__ import print_function
import sys, os, time
for x in range(0,10):
print(x, sep=' ', end='')