+ 1
Please explain me, is python uses more memory.
>>> a=12345 >>> sys.getsizeof(a) 28 >>> b=1 >>> sys.getsizeof(b) 28 >>> a="12345" >>> sys.getsizeof(a) 54 >>> b="1" >>> sys.getsizeof(b) 50 >>> b="12" >>> sys.getsizeof(b) 51
4 odpowiedzi
+ 4
Python uses more memory than C++, notice the difference? Python (Interpreted), C++ (Compiled) and yes Interpreted languages have downsides
+ 4
People use Pythob because of 3 things ease of learning, popularity and many school teaches it
+ 1
If python3 uses more memory so why people is prefer? 🤔
Output shows a one int variable size id 28 byte 😱, and string variable size is 50 byte
+ 1
(I read python treated all things in object form like a int type variable is a integer object type.) if this is true. So this is the reason of python uses more memory?