Is there a way to check that Elements within list1 are part of list2? What I've tried is down below... But I don't get an ouput. I'm guessing the 'in' function only deals with individual elements?
pattern=['Tacos', 'Pizza'] Foods=['Tacos', 'Pizza', 'Burgers', 'Fries', 'Ice-cream'] if pattern in foods: print('yes')
foods, or all of them? And if all, do they have to be consecutive? Or just in that order? Or can they be in any order?