Hello I am new to python.
Does Python IDLE and Pycharm handle is
and ==
statements differently? In Python IDLE I get false
for the statement apple is orange
and in PyCharm it seems to return true
.
I had set both apple = 500
and orange = 500
. In python IDLE I got false
for apple is orange
, as I had expected, since they are different objects. I got true
for apple == orange
since both are equal to 500. In Pycharm community edition I set up if statements to test the same statements and I got true
for both.
Unfortunately I can not upload a screenshot due to my reputation not being 10.