check if a list is a string code example
Example 1: if list item in string python
if any(ext in url_string for ext in extensionsToCheck):
print(url_string)
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