Tag

bool

1 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2024 · Fundamentals

Understanding Python Magic Methods: __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__

This article explains Python's special (magic) methods such as __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__, describing their purpose, how they affect object behavior, and provides concrete code examples demonstrating their usage and output.

Magic MethodsPythonSpecial Methods
0 likes · 5 min read
Understanding Python Magic Methods: __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__
Test Development Learning Exchange
Test Development Learning Exchange
Aug 10, 2023 · Fundamentals

Python Built‑in Functions for Data Type Casting

This article explains how to use Python's built‑in casting functions—int(), float(), str(), bool(), list(), tuple(), set() and dict()—to convert between numeric, string, boolean, sequence, and mapping types, providing clear code examples for each conversion scenario.

Python__str__bool
0 likes · 14 min read
Python Built‑in Functions for Data Type Casting
Python Programming Learning Circle
Python Programming Learning Circle
Mar 29, 2023 · Fundamentals

Understanding Boolean Types and Operations in Python

This article explains Python's Boolean type, how True and False are represented, demonstrates the bool() function, shows truthy and falsy values, and illustrates logical operators and arithmetic with booleans, while also covering the special None value and common pitfalls.

BooleanLogical OperatorsNone
0 likes · 5 min read
Understanding Boolean Types and Operations in Python
Python Programming Learning Circle
Python Programming Learning Circle
Sep 29, 2021 · Fundamentals

Common Python Data Types and Their Usage

This article introduces Python’s fundamental data types—including integers, floats, booleans, and strings—explaining their characteristics, representation formats, common pitfalls such as floating‑point precision, and provides concise code examples illustrating each type’s usage in Python.

PythonStringbool
0 likes · 3 min read
Common Python Data Types and Their Usage