Program - Python reuses objects for small integers - use "==" for equality, "is" for identity


Topic: Program - Python reuses objects for small integers - use "==" for equality, "is" for identity

Solution

a = 1
b = 1
print('a is b', bool(a is b))
c = 999
d = 999
print('c is d', bool(c is d))



List all Python Programs