Category: sys

Problem

Track object memory with sys.getsizeof.

Solution

  print(sys.getsizeof(big_list))
  

Notes

  • Adapt variable names and paths to your project
  • Add error handling for production use
  • See related chapters in the Learning Path