- 链接地址:https://blog.csdn.net/m0_54689021/article/details/126272005
- 链接标题:PAT甲级:1055 The World‘s Richest |Python_python 1055 the world's richest-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:230
文章浏览阅读219次。再写一个自定义排序的函数来将People这个包含所有Person对象的列表按照题目要求的排序方式进行排序。每次读入一个人的三个属性 就把它定义为一个Person的对象 放入People数组中。最后每次都遍历一次People列表 若当前对象的年龄是在范围内 输出即可。首先需要一个Person类 其中包含三个属性:财富、名字、年龄。........._python 1055 the world's richest
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除