The point about memory use is not really true. Internally Python optimizes for these situations by passing references and using the same reference for common integer objects. There are also pre-allocated pools of memory to serve for specific types.
The point about memory use is not really true. Internally Python optimizes for these situations by passing references and using the same reference for common integer objects. There are also pre-allocated pools of memory to serve for specific types.