Program - python function to add even number from 1st list and odd number from 2nd list


Topic: Program - python function to add even number from 1st list and odd number from 2nd list

Solution

def even_odd(l1, l2):
    return[x + y for x, y in zip(l1, l2) if x % 2 ==0 and y % 2 != 0]



List all Python Programs