Answers for "how much memory python variable allocates"

1

python how much memory does a variable need

from sys import getsizeof
a = 42
getsizeof(a) # size of object in bytes
Posted by: Guest on May-18-2021

Code answers related to "how much memory python variable allocates"

Python Answers by Framework

Browse Popular Code Answers by Language