用户:ALFA_ROMEO查看:0 回复:1 评论:0 创建时间:2020-09-26T20:26:28
【作品展示】

【作品介绍】
时间表
【作品源代码】
import time
def st(h,M,s):
return '%02d:%02d:%02d'%(h,M,s)
def main():
while 1:
t = time.localtime()
h = t[3]
M = t[4]
s = t[5]
print(st(h,M,s),end = '\r',flush=True)
time.sleep(1)
main()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn
蒟蒻OIer1048576import time
def st(h, M, s):
return '%02d:%02d:%02d' % (h, M, s)
def main():
while 1:
t = time.localtime()
h = t[3]
M = t[4]
s = t[5]
print(st(h, M, s), end='',flush=True)
time.sleep(1)
print(end='\r')
main()
点赞0
评论