Object caching and reuse retains equivalent objects instead of allocating duplicates. CPython can reuse repeated small values, reducing memory costs when data contains few distinct objects, but behavior depends on implementation, version, and data pattern. section 2.4.1
Testing string reuse
Constructing identical strings with constant expressions may produce the same object, while constructing them through a variable can produce distinct objects. Compare identity with id() and content with ==; equal values do not guarantee reused objects.
