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

    58 How do Python's any and all functions work? any and all take iterables and return True if any and all (respectively) of the elements are True.

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

    Generally speaking: all and any are functions that take some iterable and return True, if in the case of all, no values in the iterable are falsy; in the case of any, at least one value is truthy. A value x is …

  3. 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 () but still can't find …

  4. python - typing.Any vs object? - Stack Overflow

    Oct 2, 2016 · Yes, there is a difference. Although in Python 3, all objects are instances of object, including object itself, only Any documents that the return value should be disregarded by the …

  5. 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 elements evaluate to T...

  6. python - How to check if a variable matches any item in list using the ...

    The problem is that any() returns True if any one of the elements in the iterable is True, so your code keeps looping as long as the answer isn't equal to all the strings in months_list —which is probably …

  7. python - Understanding the use of any () and all () in numpy arrays ...

    Jun 11, 2018 · I did not realize any () and all () only referred to boolean arrays. Thank you for your response! On 1D numpy arrays of integers like yours, any will give you True if and only if some …

  8. Python Any from typing vs generic any - Stack Overflow

    May 22, 2022 · I know by PEP 585 on python 3.9 using generic types vs from the typing module is preferred as most types from typing will be deprecated. So does that also hold for the Any type? I …

  9. Python type hint of type "any type"? - Stack Overflow

    Jul 7, 2023 · I want to provide a type hint that is any type. For example the type can be int, float, str, or even a yet-to-be-created custom type. It is being used in a case where I am created custom types, …

  10. How can I make a Python script standalone executable to run without …

    Jan 24, 2017 · I'm building a Python application and don't want to force my clients to install Python and modules. So, is there a way to compile a Python script to be a standalone executable?