About 1,950,000 results
Open links in new tab
  1. python - Pass boolean values as input to method - Stack Overflow

    Dec 28, 2016 · How do I pass boolean as argument to a method ? For example, I have a code as below: def msg_util(self, auth_type=None,starttls=False): .... starttls=True invoke_tls(self, …

  2. Python Booleans - W3Schools

    Python also has many built-in functions that return a boolean value, like the isinstance() function, which can be used to determine if an object is of a certain data type:

  3. bool() in Python - GeeksforGeeks

    Feb 21, 2025 · In Python, bool() is a built-in function that is used to convert a value to a Boolean (i.e., True or False). The Boolean data type represents truth values and is a fundamental …

  4. Python Booleans: Use Truth Values in Your Code – Real Python

    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 …

  5. How to return boolean from function - LabEx

    Learn how to effectively return boolean values in Python functions, explore boolean logic techniques, and improve your coding skills with practical examples and best practices.

  6. Booleans in Python

    Learn about Python booleans, their declaration, boolean values of data types using bool () function & operations that give boolean values.

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

    Oct 14, 2022 · Do you need to create a function that returns a Boolean (True or False) but you don’t know how? No worries, in sixty seconds, you’ll know! Go! A Python function can return …

  8. Beginner question: returning a boolean value from a function in Python

    Nov 12, 2010 · I'm trying to get this rock paper scissors game to either return a Boolean value, as in set player_wins to True or False, depending on if the player wins, or to refactor this code …

  9. How to Use a Boolean in Python? (With Examples) - Cherry Servers

    Jul 29, 2024 · There are mainly two ways to use Boolean in Python functions. The first option is to use Boolean values as parameters for functions and the second option is to use them as …

  10. Python bool Function with Examples | PythonPL

    Sep 23, 2023 · One such function is the bool () function, which is used to convert a given value to a Boolean value, i.e., either True or False. In this blog post, we will explore the Python bool () …

  11. Some results have been removed
Refresh