Answers for "how to find our element is also in another list in pyton"

0

items of a list not in another list python

main_list = list(set(list_2) - set(list_1))
Posted by: Guest on October-17-2021
2

check if part of list is in another list python

'''    
    check if list1 contains any elements of list2
'''
result =  any(elem in list1  for elem in list2)
if result:
    print("Yes, list1 contains any elements of list2")    
else :
    print("No, list1 contains any elements of list2")
Posted by: Guest on June-25-2020

Code answers related to "how to find our element is also in another list in pyton"

Python Answers by Framework

Browse Popular Code Answers by Language