注意:sort() 函数没有返回值,但可以使用 list.sort() 对列表的对象进行排序。所以,不能使用 list = list.sort(),这样返回的是None。 参考:Python3 List sort()方法 | 菜鸟教程 (runoob.com)