I'm having trouble rendering the result of a specific time transformation, in the form HH:MM:SS
, all in seconds. The result is correct, but with .0
at the end, which makes my response invalid on a site.
My code:
horario = input()
hora = float(horario[0:2])* int(3600)
minuto = float(horario[3:5])* int(60)
segundo = float(horario[6:8])
C = float(hora + minuto + segundo)
print(int(C))
# Saída: 18711.0