I'm trying to understand the below snippet.
import sys
variable = 30
print(sys.getsizeof(variable)) #prints 28
If I change integer value with string
import sys
variable = "30"
print(sys.getsizeof(variable)) #prints 51
So does it means integer object makes use of less memory than string object.
Please let me know how Python makes use of memory.
sys.getsizeof[doesn't take into account the memory attributed to objects the given object refers to].