ID EN
Sys

getsizeof

Python 3.11

Return the size of an object in bytes. The object can be any type of object. All built-in objects will return correct results, but this does not have to hold true for third-party extensions as it is implementation specific.

Syntax

PYTHON
sys.getsizeof(object[, default])

See Also

TypeError getsizeof() getsizeof()