my_list = ['abc-123','def-456','ghi-789','abc-456']
imp = raw_input('Search item: ')
for items in my_list:val = itemsif any(imp in val for items in my_list):print(items)
some_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']# select element where "abc" or "ghi" is includedfind_1 = "abc"find_2 = "ghi"result = [element for element in some_list if find_1 in element or find_2 in element]# Output ['abc-123', 'ghi-789', 'abc-456']