Program - python function to add even mubers in a list


Topic: Program - python function to add even mubers in a list

Solution

def add_even_num(l):
    sum = reduce(lambda a, b: a + b, filter(lambda a: (a % 2 == 0), l))
    return sum



List all Python Programs