-1

如果发现与另一个列表中的另一个项目匹配,我如何从列表中删除一个项目?

for item in bigIpList:
    for item2 in smallIpList:
        if item==item2:
            #remove item from bigIpList
4

1 回答 1

0

使用过滤器:

bigIpList = filter(lambda e: e not in smallIpList, bigIpList)
于 2016-05-23T20:43:57.640 回答