例题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
例题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