它没有给出正确的奖牌榜,我不知道我在代码中犯了什么错误。事实上,时间最少的运动员应该获得一枚金牌,而铜牌则应该获得一枚奖牌。# loop through the athlete dictionary # store the key of the dict_time as name and country and value as time in seconds
dict_time[item,athelete[item][0]] = athelete[item][1][0]*3600 + athelete