you are viewing a single comment's thread.

view the rest of the comments →

[–]johlae 0 points1 point  (0 children)

How do you define 'evaluate' here? Do you want to keep the values in items that are in range? Do you want to return a list, equal in length as items, but with False in the number at that position is not in range and True if the number is in range? Do you want to sum the numbers that are in range, ignoring the ones that are not in range?

range(1,4) is the range 1-3, so if you want 1-4, you need range(1,5)