在包含多个字典的列表中,如何获取具有键最大值的字典?

时间:2019-06-10 04:20:11

标签: python-3.x

我有此列表

compileSdkVersion 27
buildToolsVersion "27.1.0"

现在,我想根据每个名称的最高分获得整个字典。

我的预期输出是:

result = [{"name": "A", "score": 35, "other_details": ""},
          {"name": "A", "score": 60,"other_details": ""},
          {"name": "B", "score": 45, "other_details": ""}, 
          {"name": "B", "score": 34, "other_details": ""},
          {"name":"C", "score": 65, "other_details": ""}]

1 个答案:

答案 0 :(得分:0)

使用AzureWebJobsStorage

例如:

{
  "ConnectionStrings": {
    "AzureWebJobsStorage": "{storage connection string}"
  }
}

输出:

AzureWebJobsStorage