Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python check variable size in memory

>>> from sys import getsizeof
>>> a = 42
>>> getsizeof(a)
12
>>> a = 2**1000
>>> getsizeof(a)
146
>>>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #check #variable #size #memory
ADD COMMENT
Topic
Name
4+8 =