How about:

>>> any(isinstance(e, int) and e > 0 for e in [1,2,'joe'])
True

It also works with all() of course:

>>> all(isinstance(e, int) and e > 0 for e in [1,2,'joe'])
False
Answer from Antoine P. on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_func_any.asp
Python any() Function
Python Examples Python Compiler ... Interview Q&A Python Training ... The any() function returns True if any item in an iterable are true, otherwise it returns False....
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ builtins โ€บ functions.html
Built-in Functions โ€” Python 3.14.7 documentation
See also Binary Sequence Types ... Bytes and Bytearray Operations. ... Return True if the object argument appears callable, False if not. If this returns True, it is still possible that a call fails, but if it is False, calling object will never succeed. Note that classes are callable (calling a class returns a new instance); instances are callable if their class has a __call__() method. Added in version 3.2: This function was first removed in Python 3.0 and then ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-any-function
Python any() function - GeeksforGeeks
July 23, 2025 - In this example, the any() function in Python checks for any element satisfying a condition and returns True in case it finds any True value. This function is particularly useful to check if all/any elements in List meet condition in Python.
๐ŸŒ
Mostly Python
mostlypython.com โ€บ using-any
Using `any()`
January 23, 2025 - MP 132: It's a simple built-in function, but using it isn't as straightforward as it might seem. A task that's come up repeatedly in my programming work involves looking through a collection of values, and taking an action if a specific item appears anywhere in that
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ any-and-all
Python's any() and all() functions - Python Morsels
March 29, 2023 - The any function checks for the truthiness of each item in a given iterable, but we need something a little more than that: we need to check a condition on each element. Specifically, we need to check whether a number is between 0 and 5. Python ...
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-any-function
Python any() Function: Guide With Examples and Use Cases | DataCamp
July 31, 2024 - The any() function in Python returns True if at least one element in an iterable (list, tuple, set, etc.) is true, and False otherwise.
Find elsewhere
๐ŸŒ
YouTube
youtube.com โ€บ watch
Python's ANY and ALL Functions are Simpler Than You Think! - YouTube
๐Ÿš€ Think Python's any() and all() functions are complicated? Think again! In this tutorial, I'll show you exactly how these powerful functions work and why t...
Published: January 10, 2025
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-any-and-all-functions-explained-with-examples
Python any() and all() Functions โ€“ Explained with Examples
August 10, 2021 - When coding in Python, have you ever had to check if any item or all items in an iterable evaluate to True? The next time you need to do so, be sure to use the nifty functions any() and all(). In this tutorial, we'll learn about Python's any() and al...
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ Array โ€บ some
Array.prototype.some() - JavaScript | MDN
The following example tests whether any element in the array is bigger than 10. ... function isBiggerThan10(element, index, array) { return element > 10; } [2, 5, 8, 1, 4].some(isBiggerThan10); // false [12, 5, 8, 1, 4].some(isBiggerThan10); // true
๐ŸŒ
Medium
medium.com โ€บ @prathik.codes โ€บ any-and-all-functions-da2335f4ad28
Any and All Functions. Python Quickies #7 | by Prathik C | Medium
December 1, 2024 - any function returns True if at least one element in the iterable is True (or is โ€œtruthyโ€). If all elements are False (or are โ€œfalseyโ€, or if the iterable is empty), it returns False.
๐ŸŒ
Quora
quora.com โ€บ What-happens-when-you-use-the-built-in-function-any-on-a-list-in-Python
What happens when you use the built-in function any () on a list in Python? - Quora
Answer (1 of 3): `any()` returns `True` if any element of that list evaluates to BoolType `True` (or not-Falsey). Itโ€™s easier to enumerate the Falsey objects: 0 of any type (int/float) * `None` (`NoneType`) * `False` * `[]`, ``, `()`, `{}` (empty iterable) including `range(0)` * An object d...
๐ŸŒ
Sharp Coder Blog
sharpcoderblog.com โ€บ blog โ€บ understanding-pythons-any-and-all-functions
Understanding Python's any() and all() Functions | Sharp Coder Blog
September 4, 2024 - The any() function checks if at least one element in an iterable is True. If any element in the iterable is True, the function returns True; otherwise, it returns False. If the iterable is empty, any() returns False.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ collections.html
collections โ€” Container datatypes
The seq argument can be any object which can be converted into a string using the built-in str() function. In addition to supporting the methods and operations of strings, UserString instances provide the following attribute: ... A real str object used to store the contents of the UserString class. Changed in version 3.5: New methods __getnewargs__, __rmod__, casefold, format_map, isprintable, and maketrans. ... ยฉ Copyright 2001 Python Software Foundation.
๐ŸŒ
JetBrains
jetbrains.com โ€บ pycharm
PyCharm: The only Python IDE you need
June 2, 2021 - Instead of spending time endlessly configuring a text editor to act like an IDE, I just fire and forget PyCharm. Its incredible code refactoring functionality is like no other. I spend more time refactoring and editing existing code, and PyCharm allows me to do that with just a few keybinds.
๐ŸŒ
Interactive Chaos
interactivechaos.com โ€บ en โ€บ python โ€บ function โ€บ any
any | Interactive Chaos
Python functions ยท Python methods ... Description ยท The any function returns the boolean True if any of the elements of the iterable that is passed as an argument is True, and returns the boolean False otherwise (or if the iterable is empty)....
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ howto โ€บ sorting.html
Sorting Techniques โ€” Python 3.14.7 documentation
In this document, we explore the various techniques for sorting data using Python. A simple ascending sort is very easy: just call the sorted() function. It returns a new sorted list: ... You can also use the list.sort() method. It modifies the list in-place (and returns None to avoid confusion).
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_func_all.asp
Python all() Function
Python Examples Python Compiler ... Interview Q&A Python Training ... The all() function returns True if all items in an iterable are true, otherwise it returns False....
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ how-and-when-to-use-any-and-all-in-python
How and when to use any() and all() in Python
Contact Us ยท all(iterable): Returns True if all elements in the iterable are True; otherwise, False. any(iterable): Returns True if at least one element in the iterable is True; otherwise, False.