Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get list memory size

>>> import sys
>>> sys.getsizeof([])
36
>>> sys.getsizeof([1])
40
>>> lst = []
>>> lst.append(1)
>>> sys.getsizeof(lst)
52
>>> 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #memory #size
ADD COMMENT
Topic
Name
3+8 =