Write a program to get the matched elements from two list


Topic: Write a program to get the matched elements from two list

Solution

a = [1, 2, 3, 4, 5]
b = [9, 8, 7, 6, 5]
[i for i, j in zip(a, b) if i != j]



List all Python Programs