About 281,000 results
Open links in new tab
  1. How do Python's any and all functions work? - Stack Overflow

    any is a function. The contents of the list are evaluated without short-circuiting because it is not possible to call a function until the arguments are evaluated . Please note that Stack Overflow …

  2. python - Using any() and all() to check if a list contains one set of ...

    in the case of any, at least one value is truthy. A value x is falsy iff bool(x) == False. A value x is truthy iff bool(x) == True. Any non-boolean elements in the iterable are perfectly acceptable — …

  3. any () function in Python with a callback - Stack Overflow

    Jan 6, 2010 · The Python standard library defines an any() function that Return True if any element of the iterable is true. If the iterable is empty, return False. It checks only if the …

  4. python - Pythonic way of checking if a condition holds for any …

    See How do Python's any and all functions work? for an explanation of any and its counterpart, all. If the condition you want to check is "is found in another container", see How to check if …

  5. How does this input work with the Python 'any' function?

    But with generator expressions, Python no longer has to create that internal list of True(s) and False(s), the values will be generated as the any function iterates through the values …

  6. python - Use a.any() or a.all() - Stack Overflow

    Dec 26, 2015 · if valeur <= 0.6: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() I have read several posts about a.any() or a.all() …

  7. Python: any() unexpected performance - Stack Overflow

    Jun 29, 2017 · The reason is that you've passed a generator expression to the any() function. Python needs to convert your generator expression to a generator function and that's why it …

  8. python - Opposite of any () function - Stack Overflow

    Built in function all() and any() in Python. 0. Python: any() statement not returning true as expected. 1.

  9. python - Return value of any () - Stack Overflow

    In Python 3.8, the assignment expression can be used to capture the witness that causes any to return True. for l in lines: if any((x:=word) in l for word in list): return x If any returns True, it is …

  10. Pandas .any() vs. Python any() on Dataframe - Stack Overflow

    Nov 27, 2023 · What is the reason to prefer Pandas implementation of .any() instead of Python's builtin any() when used on a DataFrame? Is there a performance reason to this, since Pandas …

Refresh