Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
dd = [
{
"00:00-00:30": 4869
},
{
"00:30-01:00": 5652
},
{
"01:00-01:30": 4935
},
{
"01:30-02:00": 5033
},
{
"23:00-23:30": 5528
},
{
"23:30-00:00": 6530
}
]
from operator import itemgetter
a = {key: value for x in dd for key, value in x.items()}
print(sorted(a.items(), key=itemgetter(1),reverse=True)[0])