About 50 results
Open links in new tab
  1. How to use boolean 'and' in Python - Stack Overflow

    Dec 8, 2013 · How to use boolean 'and' in Python [duplicate] Asked 16 years, 10 months ago Modified 12 years, 1 month ago Viewed 286k times

  2. How do I use a Boolean in Python? - Stack Overflow

    Does Python actually contain a Boolean value? I know that you can do: checker = 1 if checker: #dostuff But I'm quite pedantic and enjoy seeing booleans in Java. For instance: Boolean checker;...

  3. boolean - 'True' and 'False' in Python - Stack Overflow

    Boolean operations: In the context of Boolean operations, and also when expressions are used by control flow statements, the following values are interpreted as false: False, None, numeric zero of all …

  4. Syntax for an If statement using a boolean - Stack Overflow

    I just recently joined the python3 HypeTrain. However I just wondered how you can use an if statement onto a boolean. Example: RandomBool = True # and now how can I check this in an if statement? L...

  5. Converting from a string to boolean in Python - Stack Overflow

    How do I convert a string into a boolean in Python? This attempt returns True: >>> bool ("False") True

  6. How to set python variables to true or false? - Stack Overflow

    47 I want to set a variable in Python to true or false. But the words true and false are interpreted as undefined variables:

  7. syntax - Python boolean expression and or - Stack Overflow

    The reason is that Python evaluates boolean expression using the actual values of the variables involved, instead of restricting them to True and False values. The following values are considered to …

  8. How do I get the opposite (negation) of a Boolean in Python?

    For a Numpy array, maybe, but for a standard Python list, this is incorrect. Since the OP does not mention either, I fail to see how this answers the question.

  9. How to evaluate nested boolean/logical expressions in Python?

    Aug 5, 2024 · How to evaluate nested boolean/logical expressions in Python? Asked 1 year, 5 months ago Modified 1 year, 5 months ago Viewed 407 times

  10. python - Logical operators for Boolean indexing in Pandas - Stack …

    Python's and, or and not logical operators are designed to work with scalars. So Pandas had to do one better and override the bitwise operators to achieve a vectorized (element-wise) version of this …