Where are the variables in Python stored?
memory-management, python
Solution
Copying from Python documentation:
Memory management in Python involves a private heap containing all Python objects and data structures. The management of this private heap is ensured internally by the Python memory manager. The Python memory manager has different components which deal with various dynamic storage management aspects, like sharing, segmentation, preallocation or caching.
Problem
In C++, the local variables are stored in stack, while the datas created by new operator are stored in heap. So, what about the variables in Python? Where are they stored?