Python memory management for variables
Question: I have a question regarding python memory management. I have the following
code

    
    
    def operation(data):
        #some manipulations on data
        result=something.do(data)
        #some manipulations on result
        return result
    

Now I am calling this function `operation` many times (probably like more than
200 times). Does python use a same memory for the `result` variable everytime
I call `operation`? As in `C` we can use `Malloc` to allocate memory once and
use to the same memory inorder to avoid fragmentation.


Answer: The whole point of high-level languages like Python is that they free you from
having to worry about memory management. If exact control over memory
allocation is important to you, you should write C. If not, you can write
Python.

As most Python programmers will tell you from their experience, manual memory
management isn't nearly as important as you think it is.

