How to find the list items that is in other list in Python

1 Answer

0 votes
lst1 = [3, 6, 4, 8, 9]
lst2 = [4, 8]
 
for l in lst1:
    if l in lst2:
         print(l)


 
'''
run:
 
4
8
 
'''

 



answered Aug 14, 2019 by avibootz
...