📌  相关文章
📜  python 查找列表中的第一个匹配项 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:09.402000             🧑  作者: Mango

代码示例3
#iterate through list
for item in yourlist:
    #if item is equal to a value
    if item == 'value':
        #store the item in a variable
        yourvar = item
        #break out of loop
        break