Python check the memory usage of an object

Last updated 3 years, 3 months ago | 1524 views 75     5

Tags:- Python

Python | Check the memory usage of  an object

>>> import sys
>>> x = 100

>>> print(sys.getsizeof(x))
28