You are viewing a single comment's thread. Return to all comments →
You can also use the fact that True == 1 and False == 0
True == 1
False == 0
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 →
You can also use the fact that
True == 1
andFalse == 0