Có thể chuyển đổi int thành giờ không: Min: Sec
import datetime
x = 40000
t = int[x]
day = t//86400
hour = [t-[day*86400]]//3600
min = [t - [[day*86400] + [hour*3600]]]//60
seconds = t - [[day*86400] + [hour*3600] + [min*60]]
hello= datetime.time[hour.hour, min.minute, seconds.second]
print [hello ]
Tôi muốn đầu ra này:- 11:06:40
Hỏi ngày 18 tháng 12 năm 2017 lúc 15:12Dec 18, 2017 at 15:12
Bạn cũng có thể thuê ngoài tất cả các hoạt động phân chia và modulo cho các bản dựng Python [hãy nhớ: bao gồm pin!]
>>> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> import time
>>> x = 40000
>>> time.strftime['%H:%M:%S', time.gmtime[x]]
'11:06:40' # >> Nhập Datetime ..