I'm new to python.To find the sizeof an integer i used getsizeof method available in sys module. It returns 24 bytes for integer and 34 bytes for char.
>>> sys.getsizeof(1)
24
>>> sys.getsizeof('a')
34
I feel this size (24 bytes or 34 bytes) is very large to hold an integer or char... I feel that memory is getting wasted much.. Could you please help me in understanding the concept behind this memory management in python.
'a'is a string, not a char.