About 9,230,000 results
Open links in new tab
  1. Check for True or False in Python - GeeksforGeeks

    Jul 23, 2025 · Python provides various ways to check if an expression is evaluated as True or False. Let us see them one by one: The bool () function is an in-build Python function that …

  2. Python Booleans - W3Schools

    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:

  3. Python Function return True/False - Stack Overflow

    Mar 6, 2018 · Do you want to print a boolean, return a boolean, or do both? It seems to me that your isLeapYear function is trying to do too many things. The name of the function implies that …

  4. Built-in FunctionsPython 3.14.2 documentation

    18 hours ago · If the argument is false or omitted, this returns False; otherwise, it returns True. The bool class is a subclass of int (see Numeric Types — int, float, complex). It cannot be …

  5. The Python return Statement: Usage and Best Practices

    All Python functions have a return value, either explicit or implicit. You’ll cover the difference between explicit and implicit return values later in this tutorial.

  6. Return True or False in Python - Java2Blog

    Dec 4, 2023 · In Python, returning True or False can be achieved through a variety of methods, each suitable for different scenarios. F rom basic boolean expressions and operators to more …

  7. Python Return Boolean (True/False) From Function - Finxter

    Oct 14, 2022 · A Python function can return any object such as a Boolean value (True or False). To return a Boolean, you can have an arbitrary simple or complex expression within the …

  8. Understanding Python Booleans With Examples | by codingsprints …

    Apr 19, 2025 · Learn how expressions, values, and functions return True or False with real-world examples. In Python, Booleans represent one of two values: True or False. You’ll use Boolean …

  9. How to return boolean from function - LabEx

    In Python programming, returning boolean values from functions is a fundamental skill that enables developers to create more precise and logical code.

  10. bool () in Python - GeeksforGeeks

    Feb 21, 2025 · bool () function evaluates the truthness or falseness of a given value and returns either True or False. Understanding how bool () works is crucial for writing effective and …