[Tutor] Negative IF conditions

Alan Gauld alan.gauld at freenet.co.uk
Fri Feb 11 19:45:51 CET 2005


> I'm a newbie and was wondering which of these IF conditions is
better structure:

>   1.. if not os.path.exists('filename'):
>   2.. if os.path.exists('filename') == False:

Which one reads easiest?
I'd say the first one personally. But both are OK.

Alan G.



More information about the Tutor mailing list