It is easy to check if an element of a list is in another list using any():
any()
any(elem in list2 for elem in list1)
but is there
Yes, it is possible, by using a filter when doing your list comprehension :
list1 = ['a', 'b', 'c', 'd', 'e'] list2 = ['g', 'z', 'b', 'd', '33'] [elem for elem in list1 if elem in list2] # ['b', 'd']