I wanted to understand how memory allocation works in python lists.
When I define a list as above, I can see that for some elements, the addresses are exactly the same eg. 0th and 2nd element.
On the other hand when all elements are distinct, I can see that all element's addresses are distinct. Does this mean that the list internally maintains some kind of a map which prevents creating copies of elements which are repeating in the list?
Thanks!