You are viewing a single comment's thread. Return to all comments →
It's about 5 times faster on my machine to put the list comprehension within brackets:
print(sum([s <= a + d <= t for d in apples])) print(sum([s <= b + d <= t for d in oranges]))
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
It's about 5 times faster on my machine to put the list comprehension within brackets: