Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果发现与另一个列表中的另一个项目匹配,我如何从列表中删除一个项目?
for item in bigIpList: for item2 in smallIpList: if item==item2: #remove item from bigIpList
使用过滤器:
bigIpList = filter(lambda e: e not in smallIpList, bigIpList)