#38382: python 解法


115205@tchcvs.tw (114級115205資2班.張楷昊)


python二維陣列排序

先排數字再排英文

可使用g.sort(key=lambda x:x[二維陣列排序目標的索引])

g=[[2,2][1,1]]

g.sort(key=lambda x:x[0])

print(g)

#[[1,2][2,1]]

完整解答:https://drive.google.com/file/d/1weDqiwKI_UUXsGtnhPNiS5GRpu4j5XcO/view?usp=sharing