def seconds_day_hms(seconds: int):# print("时间换算:", seconds)# 分钟,秒m, s = divmod(seconds, 60)# 时,分h, m = divmod(m, 60)# 天,时d, h = divmod(h, 24)print(f"{d}天{h}时{m}分{s}秒")return (d, h, m, s)
900字范文,内容丰富有趣,生活中的好帮手!
时间:2020-02-21 14:43:22
def seconds_day_hms(seconds: int):# print("时间换算:", seconds)# 分钟,秒m, s = divmod(seconds, 60)# 时,分h, m = divmod(m, 60)# 天,时d, h = divmod(h, 24)print(f"{d}天{h}时{m}分{s}秒")return (d, h, m, s)