怎么在shell下运行python的 py文件

2024-11-16 19:58:16
推荐回答(1个)
回答1:

def sort(a): for k in range(len(a)): (a[k][0],a[k][1]) = (a[k][1],a[k][0]) a.sort() for k in range(len(a)): (a[k][0],a[k][1]) = (a[k][1],a[k][0])a = [[1,2,4],[6,5,6],[2,5,9]]sort(a)print(a)