【发布时间】:2017-07-04 18:58:12
【问题描述】:
如何从列表 a 中删除列表 b 中包含链接值的所有字典?
a = [{'link':'http://example.com/1/', 'id': 1}, {'link':'http://example.com/2/', 'id': 2}]
b = ['http://example.com/2/', 'http://example.com/3/']
a 应该是:
a = [{'link':'http://example.com/1/', 'id': 1}]
【问题讨论】:
标签: python dictionary