import functools nums=[x for x in range(1,101) if x%2==0] print(functools.reduce(lambda x,y:x+y,nums))