Cómo verificar si una lista es un subconjunto de otra lista
if(all(x in test_list for x in sub_list)):
flag = True
Open Opossum
if(all(x in test_list for x in sub_list)):
flag = True
>>> a = [1, 3, 5]
>>> b = [1, 3, 5, 8]
>>> c = [3, 5, 9]
>>> set(a) <= set(b)
True
>>> set(c) <= set(b)
False
>>> a = ['yes', 'no', 'hmm']
>>> b = ['yes', 'no', 'hmm', 'well']
>>> c = ['sorry', 'no', 'hmm']
>>>
>>> set(a) <= set(b)
True
>>> set(c) <= set(b)
False