Any và all trong python
View Discussion Improve Article Save Article View Discussion Improve Article Save Article Any and All are two built ins provided in python used for successive And/Or. Any Syntax : any(list of iterables)
Output : False True True All Syntax : all(list of iterables)
Output : True False False Practical Examples
Output: See whether at least one number is divisible by 5 in list 1=> True
Output: See whether all numbers in list1 are odd => True Truth table :- This article is contributed by Mayank Rawat .If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to . See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. |