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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -