check if array exist python code example
Example 1: python check if file exists
import os
os.path.exists("file.txt") # Or folder, will return true or false
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