Thursday, 15 August 2013

Is the below command valid in python? -



Is the below command valid in python? -

is below command valid in python ?

if(os.path.isfile("file path") && os.path.isfile("another file path") )

is valid python?:

if(os.path.isfile("file path") && os.path.isfile("another file path") )

no, && isn't valid syntax, , require colon next code block. however, (and improve style):

if os.path.isfile("file path") , os.path.isfile("another file path"): # ...

python

No comments:

Post a Comment