第27566题 单选题
关于以下Python代码的运行结果描述,正确的是?
from datetime import datetime
current_time = datetime.now()
result = current_time.strftime("%Y-%m-%d %H:%M:%S")
print(result)
A

代码会抛出NameError,因为没有正确导入datetime模块

B

输出格式为 YYYY/MM/DD HH:MM:SS 的当前本地时间字符串

C

输出格式为 YYYY-MM-DD HH:MM:SS 的当前本地时间字符串

D

输出当前时间对应的Unix时间戳整数

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析