"==" and "is" in Python - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32) +---- Thread: "==" and "is" in Python (/showthread.php?tid=4713) |
"==" and "is" in Python - Canoris - 02-07-2010 Yesterday I was working with some code, and I used the "is" instead of the "==" as following: Code: import os RE: "==" and "is" in Python - uber1337 - 02-07-2010 It seems to be the characters used in the commands(-- and ?). I guess "is" doesn't evaluate those. Here is an example using and interactive session with python. Code: >>> p = 'h' |