1thelist = ["apple", "avocado", "banana"]
2
3inpt = input("Check an item in the list: ")
4
5if inpt in thelist:
6 print(inpt, "is in the list!")
1listA = [item1, item2, item3]
2if item4 in listA:
3 print('yes, item4 is in the list')
4else:
5 print('no, item4 is not in the list')
1# app.py
2
3listA = ['Stranger Things', 'S Education', 'Game of Thrones']
4
5if 'Dark' in listA:
6 print("Yes, 'S Eductation' found in List : ", listA)
7else:
8 print("Nope, 'Dark' not found in the list")
9
1'''
2 check if list1 contains all elements in list2
3'''
4result = all(elem in list1 for elem in list2)
5if result:
6 print("Yes, list1 contains all elements in list2")
7else :
8 print("No, list1 does not contains all elements in list2"