SyntaxFix
Write A Post
Hire A Developer
Questions
# To support matches from the beginning, not any matches: items = ['a', 'ab', 'abc', 'bac'] prefix = 'ab' filter(lambda x: x.startswith(prefix), items)