已知datetime库中的datetime.datetime.now(),功能是获取电脑当前的时间。运行如下程序,可以将程序每次运行的时间,记录在文件time.txt中。运行10次,就有10行。( )
import datetime
with open("time.txt","w") as t:
t.write(str(datetime.datetime.now()))
t.write('\n')
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析