📜  datetime.timedelta 格式转字符串 python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.339000             🧑  作者: Mango

代码示例1
s = 13420
hours, remainder = divmod(s, 3600)
minutes, seconds = divmod(remainder, 60)
print '{:02}:{:02}:{:02}'.format(int(hours), int(minutes), int(seconds))
# result: 03:43:40