#38382: python 解法


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

學校 : 國立臺中高級家事商業職業學校
編號 : 233256
來源 : [111.252.111.133]
最後登入時間 :
2024-04-24 15:22:06
e788. b3.畢業典禮(Ceremony) -- 2019年12月TOI練習賽 | From: [114.35.132.169] | 發表日期 : 2023-11-17 20:28

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

 
ZeroJudge Forum