How to python how to check string occurence between two list (Python Programing Language)
Answer(s) available: 1
'''I know this is an old question, but if anyone was wondering how to get matches or the length of the matches from one or more lists. you can do this as well.'''
a = [1,2,3]
b = [2,3,4]
c = [2,4,5]
'''To get matches in two lists, say a and b will be'''
d = [value for value in a if value in b] # 2,3
'''For the three lists, will be'''
d = [value for value in a if value in b and value in c] # 2
len(d) # to get the number of matches
#also, if you need to handle duplicates. it will be a matter of converting the list to a set beforehand e.g
a = set(a) # and so on
Source: Code Grepper
Her Name is...