本帖最后由 红唇如刀 于 2020-7-16 19:53 编辑 import json
str1 = '''
{"code":20000,
"message":"OK",
"data":{"166858081":
{" core_avg_pcp_rank_change":null,
"male_n_ID":{"items":
[{
"name": "Tom",
"gender": "male",
"result":"60",
"id":"433679"
}, {
"name": "Jack",
"gender": "male",
"result":"65",
"id":"433660"
},
{
"name": "John",
"gender": "male",
"result":"70",
"id":"433673"
}]},
"core_avg_pcp":0.0017177393666666665,
"core_avg_pcp_rank":342,
"fall_count":27,
"fund_flow":980297431.9999993,
"limit_up_count":0,
"plate_id":166858081,
"plate_name":"Math",
"rise_count":9,
"stay_count":0,
"female_n_ID":{"items":
[{
"name": "Rose",
"gender": "female",
"result":"80",
"id":"433678"
}, {
"name": "Kite",
"gender": "female",
"result":"65",
"id":"433570"
},
{
"name": "Jan",
"gender": "female",
"result":"90",
"id":"433661"
}]}}}
'''
这是我爬下来的网页内容,我想实现:首先:取得输出科目名称(取plate_name:的值),然后实现学生姓名的输出(取name:的值),姓名输出的顺序按照成绩由高到低排序(按照result:的值)。
恳请路过的大侠出手相助!!!!!!
|