元素的组合排序

例题1:
li_num1=[4,5,2,7]
li_num2=[3,6]
li_num2.extend(li_num1)
li_num2.sort(reverse=True)
print(li_num2)

C:\DataSoft\python38\python.exe C:/Users/Administrator/PycharmProjects/Test/排列.py
[7, 6, 5, 4, 3, 2]

Process finished with exit code 0
 

你可能感兴趣的:(列表和元组,python)