Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonCPython bytecode and disSingle-choice MCQ

Within a single code object, `x = 257` then `y = 257` makes `x is y` True, yet two values both produced by `int('257')` at runtime are NOT identical. What explains the difference?

x = 257 y = 257 print(x is y) # True print(int('257') is int('257')) # False