📅  最后修改于: 2022-03-11 14:45:10.772000             🧑  作者: Mango
# To support matches from the beginning, not any matches:
items = ['a', 'ab', 'abc', 'bac']
prefix = 'ab'
filter(lambda x: x.startswith(prefix), items)