Both variables (names) point towards the same integer object in memory for the integers -5,256 because they are both small and are commonly used and so are loaded into memory before declaration.
>>> a = 1
>>> b = 1
>>> hex(id(a))
'0x7ffa7806e350'
>>> hex(id(b))
'0x7ffa7806e350'
This could also be tested using the 'is' operator.
>>> a is b
True
However, this caching of larger values outside of the range of -5,256 only occurs when defining both variables at the same time because the compiler is able to see that both are declared to be the same constant.
With caching:
>>> a = 333; b = 333
>>> hex(id(a))
'0x216de244790'
>>> hex(id(b))
'0x216de244790'
>>> a is b
True
Without caching:
>>> a = 333
>>> b = 333
>>> hex(id(a))
'0x216de2ac830'
>>> hex(id(b))
'0x216de244810'
>>> a is b
False
Note that this is specific to CPython and may not apply to all the other implementations of Python.