Python is writen by C language and the memory managed by a private heap.Heap memory is essentially a large pool of memory (typically per process) from which the running program can request chunks. This is typically called dynamic allocation.
Follow the link
https://docs.python.org/3/c-api/memory.html


