Python optimizes memory for frequently used integers from -5 to 256 by "interning" them, creating single shared objects to avoid repeated 28-byte allocations and boost performance.
Open the full topic