Write a function that adds 2 iterables a and b such that a is even and b is odd


Topic: Write a function that adds 2 iterables a and b such that a is even and b is odd

Solution

def add_even_odd_list(l1:list,l2:list)-> list:
    return [a+b for a,b in zip(l1,l2) if a%2==0 and b%2!=0]



List all Python Programs