python if el in array code example
Example 1: if string is in array python
if item in my_list:
# whatever
Example 2: python check array exists
array = [1,2,3,4]
exists_2 = 2 in array
print(exists_2) # True
exists_5 = 5 in array
print(exists_5) # False