We have several methods to get the items associated with abc some of the important is as follows:-
To get all the items containing abc you can use the list-comprehension below is the piece of code that illustrates how we do that:-
my_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
matching = [s for s in some_list if "abc" in s]

If you want to know more about the list-comprehension you can visit the following website:-
https://intellipaat.com/tutorial/python-tutorial/python-lists/
Another thing you can use the filter method to get the items associated with abc:-
my_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
print filter(lambda x: 'abc' in x, my_list)
