📜  如何打印时间 python 3 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:59.584000             🧑  作者: Mango

代码示例1
import datetime
now = datetime.datetime.now()
print (now.strftime("%Y-%m-%d %H:%M:%S"))
# key: https://strftime.org/