checker = None 

if some_decision:
    checker = True

if checker:
    # some stuff

[Edit]

For more information: http://docs.python.org/library/functions.html#bool

Your code works too, since 1 is converted to True when necessary. Actually Python didn't have a boolean type for a long time (as in old C), and some programmers still use integers instead of booleans.

Answer from Bastien Léonard on Stack Overflow
🌐
BrainStation®
brainstation.io › learn › python › boolean
Python Boolean (2026 Tutorial & Examples) | BrainStation®
February 4, 2025 - Booleans in Python are a data type containing a value of True or False. They are used heavily in program when storing information based on logical decisions…
🌐
W3Schools
w3schools.com › python › python_booleans.asp
Python Booleans
You can evaluate any expression in Python, and get one of two answers, True or False. When you compare two values, the expression is evaluated and Python returns the Boolean answer:
🌐
Hyperskill
hyperskill.org › university › python › boolean-values-in-python
Boolean Values in Python
July 22, 2024 - In programming languages like Python there exist two key Boolean values; True and False. These values help in making decisions based on comparisons. In Python we can assess values using various comparison operators like equal to (==), not equal to (!=) greater than (>) less than (<) greater ...
🌐
Cherry Servers
cherryservers.com › home › blog › python › how to use a boolean in python? (with examples)
How to Use a Boolean in Python? (With Examples) | Cherry Servers
November 7, 2025 - Boolean is just another data type similar to integers and strings. However, Boolean variables can have only two values: True and False. When you assign True or False to a variable, Python will treat it as if it belongs to the Boolean data type.
🌐
Simplilearn
simplilearn.com › home › resources › software development › the ultimate guide to booleans in python
The Ultimate Boolean in Python Tutorial
October 9, 2024 - Learn everything about Booleans in Python with our ultimate guide. Understand True, False, Operators, and practical applications to enhance your coding skills.
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Programiz
programiz.com › python-programming › methods › built-in › bool
Python bool() (With Examples)
Here, the method returns True values for arguments like 25, 25.14, 'Python is a String', and True. ... In the above example, the bool() method returns False values for arguments like 0, None, False and [].
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-boolean.html
Boolean Expressions
The Python "bool" type (short for "boolean") has only two values - True and False. The bool values typically show up in the tests of if-statements and while-loops.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › boolean-data-type-in-python
Python Boolean - GeeksforGeeks
July 23, 2025 - This method is used to return or ... truth testing procedure. In Python, the bool() function is used to convert a value or expression to its corresponding Boolean value (True or False)....
🌐
Python
docs.python.org › 3 › c-api › bool.html
Boolean Objects — Python 3.14.4 documentation
Booleans in Python are implemented as a subclass of integers. There are only two booleans, Py_False and Py_True. As such, the normal creation and deletion functions don’t apply to booleans. The fol...
🌐
Real Python
realpython.com › ref › builtin-functions › bool
bool() | Python’s Built-in Functions – Real Python
The built-in bool() function allows you to determine the truth value of any Python object. It returns True or False, based on whether the object is considered truthy or falsy in Python: ... Returns the truth value of any Python object as a Boolean ...
🌐
Problem Solving with Python
problemsolvingwithpython.com › 04-Data-Types-and-Variables › 04.02-Boolean-Data-Type
Boolean Data Type - Problem Solving with Python
Integers and floating point numbers can be converted to the boolean data type using Python's bool() function. An int, float or complex number set to zero returns False.
🌐
GeeksforGeeks
geeksforgeeks.org › python › bool-in-python
bool() in Python - GeeksforGeeks
February 27, 2026 - The bool() function evaluates the truthiness or falseness of a value and returns either True or False. Understanding bool() is essential for writing clean and efficient Python code.
🌐
Python Tutorial
pythontutorial.net › home › python basics › python boolean
Python Boolean
March 26, 2025 - In programming, you often want to check if a condition is true or not and perform some actions based on the result. To represent true and false, Python provides you with the boolean data type.
🌐
Mimo
mimo.org › glossary › python › booleans
Python Booleans: Essential Logic for Coding Success
Booleans continue the loop while a condition evaluates to True and terminate the loop when the condition becomes False. ... In Python, boolean values represent the truth of an expression. Logical operations with boolean operators allow you to combine, invert, or compare expressions.
🌐
Linode
linode.com › docs › guides › boolean-variables-in-python
Using Boolean Variables, Operators, and Conditional Statements in Python | Linode Docs
February 4, 2022 - 2 + 2 = 4 is true, while 2 + 2 = 5 is false. Boolean logic and Boolean expressions are more rigorous expansions of this concept. Python uses a built-in data type named bool to represent Boolean values.
🌐
Rhodes University
cs.rhodes.edu › welshc › CS141 › S20 › booleans.pdf pdf
Boolean Variables in Python
To create and use Boolean variables in Python, you can just use the special Python keywords True and False
🌐
GeeksforGeeks
geeksforgeeks.org › python › understanding-boolean-logic-in-python-3
Understanding Boolean Logic in Python 3 - GeeksforGeeks
July 15, 2025 - Booleans help our code to do just that easy and effective. More often, a boolean value is returned as a result of some kind of comparison operations. There are two Boolean keywords: True and False Operators : Operators are special symbols in Python that is used to perform arithmetic or logical computations.
🌐
Real Python
realpython.com › python-boolean
Python Booleans: Use Truth Values in Your Code – Real Python
June 16, 2023 - In this tutorial, you'll learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You'll see how to use Booleans to compare values, check for identity and membership, and control the flow ...
🌐
CodeHS
codehs.com › tutorial › evelyn › boolean-expressions-in-python
Tutorial: Boolean Expressions in Python | CodeHS
A Boolean value is either true or false. In Python, the two Boolean values are True and False, and the Python type is bool.