num = [3,2,4,6,5] anum = sorted(num) dnum = sorted(num,reverse=True) print '升序:',anum # 升序: [2, 3, 4, 5, 6] print '降序:',dnum # 降序: [6, 5, 4, 3, 2]help(sorted) # sorted(iterable, cmp=None, key=None, reverse=False) --> new sorted list sorted()最多可以接收4个参…