Python's preferred comparison operators

Posted by ensnare on Stack Overflow See other posts from Stack Overflow or by ensnare
Published on 2010-04-05T03:48:18Z Indexed on 2010/04/05 3:53 UTC
Read the original article Hit count: 333

Filed under:
|
|

Is it preferred to do:

if x is y:
    return True

or

if x == y
    return True

Same thing for "is not"

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner