num_list = [6, 8, 4, 1, 10]
print(num_list)
# 升序(reverse=False ,默认升序)
num_list.sort()
# [1, 4, 6, 8, 10]
print(num_list)
# 降序
num_list.sort(reverse=True)
# [10, 8, 6, 4, 1]
print(num_list)
# 逆序(反转)
name_list = ["张三", "李四", "王五"]
name_list.reverse()
# ['王五', '李四', '张三']
print(name_list)