Answers for "convert number to time python"

1

convert number to time python

time = 72.345.
​
hours = int(time)
minutes = (time*60) % 60.
seconds = (time*3600) % 60.
​
print("%d:%02d.%02d" % (hours, minutes, seconds))
>> 72:20:42.
Posted by: Guest on June-02-2021

Code answers related to "convert number to time python"

Python Answers by Framework

Browse Popular Code Answers by Language