题解 | #排序与反转#
排序与反转
https://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:') print(sorted(my_list,reverse=True)) print() print('Here is the original list again:') print(my_list) print() my_list.sort(reverse=True) print('The list was changed to:') print(my_list) my_list.reverse() print() print('The list was changed to:') print(my_list)