how to check if two list has same numbers list comprehension python code example
Example: how to compare two lists element by element in python and return matched element
>>> [i for i, j in zip(a, b) if i == j]
[5]
>>> [i for i, j in zip(a, b) if i == j]
[5]