Skip to content

Instantly share code, notes, and snippets.

@ImSingee
Created May 7, 2018 04:11
Show Gist options
  • Save ImSingee/f1272ab376066749c2e0141d2f57c320 to your computer and use it in GitHub Desktop.
Save ImSingee/f1272ab376066749c2e0141d2f57c320 to your computer and use it in GitHub Desktop.
「秒」转「时:分:秒」的格式
def parse_second(second):
m, s = divmod(second, 60)
h, m = divmod(m, 60)
return "%02d:%02d:%02d" % (h, m, s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment