DIEA
方法1.用List的内建函数list.sort进行排序list.sort(func=None, key=None, reverse=False) Python实例:>>> list = [2,5,8,9,3] >>> list [2,5,8,9,3] >>> list.sort() >>> list [2, 3, 5, 8, 9]方法2.用序列类型函数sorted(list)进行排序(从2.4开始)Python实例:>>> list = [2,5,8,9,3] >>> list [2,5,8,9,3] >>> sorted(list) [2, 3, 5, 8, 9]