K12教育赛事综合服务平台
聚乐之家官方网站
下载聚乐之家官方App
专注青少年竞赛题库网站
给定如下Python代码:
students = [{"name": "Alice", "score": 88}, {"name": "Bob", "score": 95}, {"name": "Charlie", "score": 92}] top_student = max(students, key=lambda stu: stu["score"]) print(top_student["name"])
Alice
Bob
Charlie
代码运行报错