As far as I understand, in Python, the List type stores only the pointers to the objects. and when I have, for instance, two lists:
>> a = [1,2,3,4,5,6,7]
>> b = ["1","2","3","4","5","6","7"]
>> sys.getsizeof(a) == sys.getsizeof(b)
>> True
the sys.getsizeof()
returns the same size.
So,basically, the size of the list (in terms of memory required) does not depend on the types stored. Is there a way (by calling a single method/function) to find out how much memory a given list and the stored elements (even when the elements are big and complex objects) in it will require?