I have a list:
my_list = [\'abc-123\', \'def-456\', \'ghi-789\', \'abc-456\']
and want to search for items that contain the string \'
\'
If you just need to know if 'abc' is in one of the items, this is the shortest way:
if 'abc' in str(my_list):