Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In Python, repeated string literals are stored only once in memory due to string interning. This means that the amount of memory consumed by repeated string literals in a program is the same as the amount of memory that would be consumed by a single instance of that string literal.