🌈 搜索
📅  最后修改于: 2022-03-11 14:45:14.369000             🧑  作者: Mango
mylist = ['abc123', 'def456', 'ghi789'] sub = 'abc' next((s for s in mylist if sub in s), None) # returns 'abc123'