How to sort a list of time values?

后端 未结 4 820
再見小時候
再見小時候 2020-12-16 03:47

I have a python list of time values that I extracted from a web log. I have the list in the format of %H:%M:%S. How would I sort the time values in ascending o

4条回答
  •  甜味超标
    2020-12-16 04:06

    Just sorted(time_list) works fine.

    >>> sorted(["14:10:01", "03:12:08"])
    ["03:12:08", "14:10:01"]
    

提交回复
热议问题