I am aware that with the timedelta function you can convert seconds to h:m:s using something like:
>> import datetime >> str(datetime.timedelta(s
You don't need to import anything!
def time(s): m = s // 60 h = (m // 60) % 60 m %= 60 s %= 60 return h,m,s