DEV Community

Discussion on: Python 'is' vs '=='

Collapse
 
jannikwempe profile image
Jannik Wempe

Isn't a is b essentially the same as id(a) == id(b)?

Collapse
 
wangonya profile image
Kelvin Wangonya

Haven't tried it out on a console, but it makes sense. I think it's the same.