a
='17:30'
b
='18:59'
time_a_one
=int(a
.split
(':')[0])
time_a_two
=int(a
.split
(':')[1])/60
time_a
=time_a_one
+time_a_two
time_b_one
=int(b
.split
(':')[0])
time_b_two
=int(b
.split
(':')[1])/60
time_b
=time_b_one
+time_b_two
time_sum
=round(time_b
-time_a
,2)
print(time_sum
)
转载请注明原文地址: https://lol.8miu.com/read-899.html