How do I search for items that contain the string 'abc' in the following list?
'abc'
xs = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
The following checks if 'abc' is in the list, but does not detect 'abc-123' and 'abc-456':
'abc-123'
'abc-456'
if 'abc' in xs:
← Назад к списку