学习笔记(17):Python 面试100讲(基于Python3.x)-如何列表元素是对象,如何排序?...

立即学习:https://edu.csdn.net/course/play/26755/340128?utm_source=blogtoedu

如果列表元素是对向,列表排序有哪些方法?

1、类内添加函数

2、调用operator指定排序属性

如何降序排列

1、通过reverse参数

2、改变类内函数

发布了26 篇原创文章 · 获赞 0 · 访问量 115

猜你喜欢

转载自blog.csdn.net/wuchuang19/article/details/104225055
今日推荐