What is the best way to compare two lists in Python and to check occurrences?
Consider that
list1 = [a, b, c]
list2 = [a, b, c, d, e, f, g]
I need two things:
- to check if list1contains elements fromlist2and get back True or False
- to check how many items (len?) fromlist2are inlist1and get back integer of those occurrences
 
     
    