题解 | #排序与反转#
排序与反转
http://www.nowcoder.com/practice/b469ae9eb1b74c029aca052286718938
my_list=['P','y','t','h','o','n'] print('Here is the original list:') print(my_list) print() print('The result of a temporary reverse order:') list=sorted(my_list,reverse=True) print(list) print() print('Here is the original list again:') print(my_list) my_list.sort(reverse=True) print() print('The list was changed to:') print(my_list) my_list.reverse() print() print('The list was changed to:') print(my_list)