'is not' or '!='

ElChino elchino at cnn.cn
Mon Aug 18 16:35:01 EDT 2014


A newbie question to you; what is the difference between statements 
like:
  if x is not None:
and
 if x != None:

Without any context, which one should be preferred?
IMHO, the latter is more readable.



More information about the Python-list mailing list