The Python Oracle

Pythonic way of checking if a condition holds for any element of a list

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Realization

--

Chapters
00:00 Question
01:13 Accepted answer (Score 254)
01:33 Answer 2 (Score 38)
01:46 Answer 3 (Score 11)
01:58 Thank you

--

Full question
https://stackoverflow.com/questions/1342...

Question links:
[documentation]: http://docs.python.org/library/stdtypes....
[How do Python's any and all functions work?]: https://stackoverflow.com/questions/1938...
[How to check if one of the following items is in a list?]: https://stackoverflow.com/questions/7402...
[How to check if all of the following items are in a list?]: https://stackoverflow.com/questions/3931.../

Accepted answer links:
[any()]: http://docs.python.org/library/functions...

Answer 2 links:
[any()]: https://docs.python.org/3/library/functi...

Answer 3 links:
[any()]: http://docs.python.org/library/functions...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #list

#avk47