def test(t):
h,m,s = t.strip().split("?
return int(h) * 3600 + int(m) * 60 + int(s)
print test(‘0:3:46’)
Python 将 计时时间转为秒
最新推荐文章于 2023-05-25 20:14:26 发布
def test(t):
h,m,s = t.strip().split("?
return int(h) * 3600 + int(m) * 60 + int(s)
print test(‘0:3:46’)