Answers for "python get list memory size"

0

python get list memory size

>>> import sys
>>> sys.getsizeof([])
36
>>> sys.getsizeof([1])
40
>>> lst = []
>>> lst.append(1)
>>> sys.getsizeof(lst)
52
>>>
Posted by: Guest on September-09-2021

Code answers related to "python get list memory size"

Python Answers by Framework

Browse Popular Code Answers by Language