Python词典搜索列表
假设我有这个:
[{"name": "Tom", "age": 10},{"name": "Mark", "age": 5},{"name": "Pam", "age": 7}]
并通过搜索“Pam”作为名称,我想检索相关的字典: {name: "Pam", age: 7}
{name: "Pam", age: 7}
怎么做到这一点?
繁星点点滴滴
DIEA
相关分类