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