About 82,300 results
Open links in new tab
  1. What does -> mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · In more recent versions of Python >= 3.5, though, it has a defined meaning. PEP 3107 -- Function Annotations described the specification, defining the grammar changes, the …

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

    4 Yes, there is a bool data type (which inherits from int and has only two values: True and False). But also Python has the boolean-able concept for every object, which is used when function …

  3. What is the practical application of bool () in Python?

    Jul 21, 2014 · To understand what bool() does we need to first understand the concept of a boolean. A boolean variable is represented by either a 0 or 1 in binary in most programming …

  4. Beginner question: returning a boolean value from a function in …

    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 …

  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 do I get the opposite (negation) of a Boolean in Python?

    One might be tempted to use the bitwise invert operator ~ or the equivalent operator function operator.inv (or one of the other 3 aliases there). But because bool is a subclass of int the …

  7. Python regular expressions return true/false - Stack Overflow

    Jul 4, 2011 · Python offers two different primitive operations based on regular expressions: re.match() checks for a match only at the beginning of the string, while re.search() checks for a …

  8. python - Pass boolean values as input to method - Stack Overflow

    Dec 28, 2016 · Please let me know if there is a way I can pass boolean type as optional parameters in python. I know that one way is to process the string in if else condition and …

  9. python - Parsing boolean values with argparse - Stack Overflow

    Are we arguing about what the Python bool() function should do, or what argparse should accept in type=fn? All argparse checks is that fn is callable. It expects fn to take one string argument, …

  10. How are booleans formatted in Strings in Python?

    How are booleans formatted in Strings in Python? Asked 15 years, 8 months ago Modified 2 years, 9 months ago Viewed 232k times