I have a list:
my_list = [\'abc-123\', \'def-456\', \'ghi-789\', \'abc-456\']
and want to search for items that contain the string \'
\'
def find_dog(new_ls): splt = new_ls.split() if 'dog' in splt: print("True") else: print('False') find_dog("Is there a dog here?")