Does this one-line text-based terrain generator go against standards? This isn't really much of an actual project, just something I threw together in about 5-10 minutes. I just want to know if it goes with the current Python standards, and if anything should be changed or fixed.

print(''.join([__import__('random').choice(['\033[7;1;32m  \033[0m','\033[7;32m  \033[0m','\033[7;1;33m  \033[0m','\033[7;34m  \033[0m']) for world in range(40)])); __import__('time').sleep(0.5)


Can anything be improved? What needs to be fixed?
What does THE standard say about imports :


  Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.


What else could easily be improved in your code ?


_ is a usual name for variable whose value is not going to be used.
you do not need to create a list : you can use generator expressions by getting rid of brackets.
you can get rid of the duplicated prefix and suffix in the different choices.
in Python 2.*, you do not need parenthesis to call print.


Your code would become :

from random import choice
from time import sleep
print ''.join('\033[7;' + choice(['1;32','32','1;33','34']) + 'm  \033[0m' for _ in range(40))
sleep(0.5)