Anonymous user
Convert seconds to compound duration: Difference between revisions
m
→Python: Procedural: copy-paste error fixed.
Walterpachl (talk | contribs) (add REXX) |
m (→Python: Procedural: copy-paste error fixed.) |
||
Line 159:
===Python: Procedural===
<lang python>>>> def duration(seconds):
for dm in (60, 60, 24, 7):
seconds, m = divmod(seconds, dm)
|