How do I determine the size of an object in Python? - Stack ...
stackoverflow.com › questions › 449560How do I determine the size of an object in Python? The answer, "Just use sys.getsizeof", is not a complete answer.. That answer does work for builtin objects directly, but it does not account for what those objects may contain, specifically, what types, such as custom objects, tuples, lists, dicts, and sets contain.