In this list the combinations appear. But I can not enumerate them. and when I printed the last total sum of 520. I do not know what I'm doing wrong.
from itertools import combinations
lis = [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46]
for i in (10, len(lis)):
for comb in combinations(lis, i):
if sum(comb) >= 280 <= 520:
for c in enumerate(comb):
print(comb)