if i is in array python code example
Example 1: python check if list contains value
if value in list:
#do stuff
#Also to check if it doesn't contain
if value not in list:
#do stuff
Example 2: check if list contains string python
some_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
if any("abc" in s for s in some_list):
# whatever