---
title: "Comment by Gaurab Panthee on \"Overview of data types and objects\" | Hashnode"
description: "Didn&#39;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"
url: "https://hashnode.com/posts/overview-of-data-types-and-objects/60b827e02102c86fd6d19457/comment/61db003c3ce4b2377adfd424"
---

[Discussion](https://hashnode.com/posts/overview-of-data-types-and-objects/60b827e02102c86fd6d19457)

Comment [Overview of data types and objects](https://hashnode.com/posts/overview-of-data-types-and-objects/60b827e02102c86fd6d19457)

[Gaurab Panthee](https://hashnode.com/@igaurab)

[Jan 9, 2022](https://hashnode.com/posts/overview-of-data-types-and-objects/60b827e02102c86fd6d19457/comment/61db003c3ce4b2377adfd424)

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](https://stackoverflow.com/questions/4626815/why-is-a-boolean-1-byte-and-not-1-bit-of-size) [1](https://stackoverflow.com/questions/449560/how-do-i-determine-the-size-of-an-object-in-python) [2](https://stackoverflow.com/questions/10365624/sys-getsizeofint-returns-an-unreasonably-large-value)
