How to place multiple imports in a single line in python -


my question how place multiple imports in single line.

from sys import argv os.path import exists 

can modify above statements single statement 1 shown below:

from sys,os.path import argv,exists    

can way..?please correct me if wrong.

nope, can't. sorry!

the python import statement supports one module import statements @ time.

if could this, hypothetically speaking, following mean:

from threading, multiprocessing import thread, condition, lock 

what module condition imported from? both modules define such class.

python prefers explicit on implicit; select 1 source import @ time results in least surprise , greatest clarity happening.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -