Python seems to be inconsistent.
x = 100
y = 100
x is y
Returns True, yet:
x = 300
y = 300
x is y
Returns False.
I even tried with new, clean variables:
> x = 100
> y = 100
> x is y
True
> x = 300
> y = 300
> x is y
False
> x = 100
> y = 100
> x is y
True
> x2 = 300
> y2 = 300
> x2 is y2
False
> x2
300
> y2
300
> x2 is y2
False
> x2 = 100
> y2 = 100
> x2 is y2
True
What is happening here? Am I confused about the "is" key word?