I notice that when using sys.getsizeof() to check the size of list and dictionary, something interesting happens.
i have:
a = [1,2,3,4,5]
with the size of 56 bytes (and empty list has size of 36, so it makes sense because 20/5 = 4)
however, after I remove all the items in the list (using .remove or del), the size is still 56. This is strange to me. Shouldn't the size be back to 36?
Any explanation?