my_list = ['P','y','t','h','o','n'] new_list = sorted(my_list) print(new_list) print(my_list) my_list.sort(reverse=True) print(my_list) # 自己确实也忘了,找了个不错的帖子,大家可以一起学习 # https://www.jianshu.com/p/d767674bea34