python seconds to hh mm ss code example Example: python format seconds to hh mm ss import time time.strftime('%H:%M:%S', time.gmtime(12345)) #'03:25:45'