有没有一种非常Python式的方法来按内部数组的长度对二维数组进行排序?例如转动这个:
[]
[[23, 70, 90]]
[[23, 70, 90], [48, 56, 99]]
[[23, 70, 90], [48, 56, 99], [79, 89, 91]]
[[23, 70, 90], [79, 89, 91]]
[[48, 56, 99]]
[[48, 56, 99], [79, 89, 91]]
[[79, 89, 91]]
进入:
[[23, 70, 90], [48, 56, 99], [79, 89, 91]]
[[23, 70, 90], [48, 56, 99]]
[[23, 70, 90], [79, 89, 91]]
[[48, 56, 99], [79, 89, 91]]
[[23, 70, 90]]
[[48, 56, 99]]
[[79, 89, 91]]
[]
当然有一行代码可以做到这一点吗?
猛跑小猪
相关分类