Contains summary from the Book* : Python Data Structures and Algorithms In the last blog, we discussed about variables. We learned that everything in Python is an object and variables are basically pointers to these memory locations containing diff...
Markdown supported · ⌘↵ to post
Gaurab Panthee
Computer Engineer
Didn't know that boolean were stored as 2-bytes. Seems there is a reason [0] for that.
Also, I tried to see size of an integer in python using
sys.getsizeof()[1] and the number was exceptionally large: 24 byte. This has to do with integer data type being represented as a class [2] as you mentioned above.References: 0 1 2