xxxxxxxxxx
num = [10,23,25,45,6,9]
findNumber = 23
res = findNumber in num
if res:
print("Number found.")
else:
print("Number isn't found")
xxxxxxxxxx
list1 = [2,3,4,3,10,3,5,6,3]
elm_count = list1.count(3)
print('The count of element: 3 is ', elm_count)
xxxxxxxxxx
stuff = ['book', 89, 5.3, True, [1, 2, 3], (4, 3, 2), {'dic': 1}]
print('book' in stuff) # Output: True
print('books' in stuff) # Output: False
# Remember it is case-sensitive
print('Book' in stuff) # Output: False
print([1,2,3] in stuff) # Output: True
print([1,2,3] not in stuff) # Output: False