如何按降序對此列表進行排序?Python list按降序排序
timestamp = [
"2010-04-20 10:07:30",
"2010-04-20 10:07:38",
"2010-04-20 10:07:52",
"2010-04-20 10:08:22",
"2010-04-20 10:08:22",
"2010-04-20 10:09:46",
"2010-04-20 10:10:37",
"2010-04-20 10:10:58",
"2010-04-20 10:11:50",
"2010-04-20 10:12:13",
"2010-04-20 10:12:13",
"2010-04-20 10:25:38"
]
轉換爲時間元組是不必要的。 – 2010-11-15 10:48:16
@馬塞洛:只有巧合。 – 2010-11-15 10:50:28
@ IgnacioVazquez-Abrams不,不是巧合。明確設計ISO 8601是爲了使字母順序與時間順序一致。 – jwg 2015-10-08 08:32:34