You’ve got great taste in music :)
Do you like The Kooks?
You’ve got great taste in music :)
Do you like The Kooks?
any([some_func(x) for x in [1, 2, 3]])
You can also do this
any(some_func(x) for x in [1, 2, 3])
See what I did here? Instead of a list comprehension we’re using a generator expression, and the code becomes more efficient :)
any([some_func(x) for x in [1, 2, 3]])
You can also do this
any(some_func(x) for x in [1, 2, 3])
See what I did here? Instead of a list comprehension we’re using a generator expression, and the code becomes more efficient :)