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
Post a Comment