Having trouble finding a python solution to matching elements of one list against elements in another list without a whole pile of \"for\" and \"if\" loops. I\'m hoping to f
Trying to answer this part of the question matching elements of one list against elements in another list could use set(), for example:
matching elements of one list against elements in another list
set()
a = ['a','b','c','d','g'] b = ['a','c','g','f','z'] list(set(a).intersection(b)) # returns common elements in the two lists