【发布时间】:2018-06-20 08:41:59
【问题描述】:
我在一个列表中有一本字典:
list1 = [{'Value': 'John','Key': 'Name'},{'Value':'17','Key': 'Number'}]
我有一个清单:
list2 = ['Name','Number']
如何检查 list2 中的值是否存在于 list1 中。 如果存在,我需要列出 Value。
例如:如果存在 Name ,则打印 "John"
【问题讨论】:
标签: python python-3.x