Tagged articles
7 articles
Page 1 of 1
Lisa Notes
Lisa Notes
Feb 23, 2026 · Fundamentals

How to Convert Any Python Data Type to Boolean

This tutorial explains Python’s bool() function, lists the values that evaluate to False, demonstrates converting numbers, strings, collections, and None to booleans, and shows how implicit conversion works in conditional statements, with concrete code examples for each case.

ListPythonbool
0 likes · 4 min read
How to Convert Any Python Data Type to Boolean
Lisa Notes
Lisa Notes
Feb 21, 2026 · Fundamentals

How to Convert Various Python Data Types to Integers

This tutorial explains why type conversion is needed in Python, describes the int(), str(), float() and bool() functions with their parameters, and provides a concrete example showing how to turn user input from a string into an integer for arithmetic.

PythonTutorialbool
0 likes · 4 min read
How to Convert Various Python Data Types to Integers
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.

boolcode-examplesint
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.

ListPythonbool
0 likes · 14 min read
Python Built‑in Functions for Data Type Casting
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.

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