Python and memory management

In one of the quiz questions about downside of python , I found an option stating that Python is not memory efficient language . I need to have some clarity on this statement . Now consider the following snippets as attached from my python directory.

In the below case we could find the address being pointed to same location since both the variables are sharing the same data value . Kindly can you please elaborate over this case and let us know as how the statement “Python is not a Memory Efficient Language” can be justified.

image

Hi @Harsha30,
It’s really good to see this statement from your perspective, but the other way around python consumes a lot of memory in object allocation (as compared to C, CPP).
Though there are others ways we can handle it.
Here’s a really cool article on whole explanation that you can refer to: https://rushter.com/blog/python-memory-managment/

Great thanks @Ishvinder

1 Like