Python все элементы в списке в другом списке
set(['a', 'b']).issubset(['a', 'b', 'c'])
Pleasant Panda
set(['a', 'b']).issubset(['a', 'b', 'c'])
check = all ( item in first_list for item in second_list )
# check = True - All elements from first_list are in second_list
# check = False - Not all elements from first_list are not in second_list
myList = ['computer', 'programming', 'hello', 'world']
query = ['hello', 'world']
# iterate through the smallest list so it takes less time
for eachQ in query:
if eachQ in myList:
print("True, query found at index " + str(myList.index(eachQ)))
else:
print("False")