将下面列表中,age最大的元素打印出来
people = [ {'name': 'alex', 'age': 1000}, {'name': 'wupei', 'age': 10000}, {'name': 'yuanhao', 'age': 9000}, {'name': 'linhaifeng', 'age': 18}, ] res = max(people, key=lambda dic: dic['age']) print(res)
Copyright @ 2024 医学小透明 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster