How do I LINQ like all in python?
ExampleCopy code to clipboard
l = ["a", "a"] all(i == 'a' for i in l)
In this example you see a list with two items, both with value "a". The Python All function returns True or False based on the predicate, in this case i == 'a'
Link to documentation or other source
15 Oct 2019
Author: Loek van den Ouweland
Would you recommend this example to your colleagues?