python时间分钟运算实现方法

it2023-01-14  65

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) #1.48
最新回复(0)