Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how much memory does a variable need

from sys import getsizeof
a = 42
getsizeof(a) # size of object in bytes
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #memory #variable
ADD COMMENT
Topic
Name
3+7 =