python之关于时间的小玩意,很受启发

#coding:utf-8
hour = int(input("Enter hour: "))
minute = int(input("Enter minute: "))
second = int(input("Enter second"))

currentTime = hour, minute, second

print("The number of secondes since midnight is", 
      (currentTime[0] * 3600 + currentTime[1] * 60 + currentTime[2]))

该程序对格式化时间差很有帮助和启发

End!

原文地址:https://www.cnblogs.com/changbo/p/5631040.html