An easy way to check if all elements of a list are in other one is converting both to sets:
def sublist(lst1, lst2):
return set(lst1) <= set(lst2)
An easy way to check if all elements of a list are in other one is converting both to sets:
def sublist(lst1, lst2):
return set(lst1) <= set(lst2)