【发布时间】:2022-01-19 17:54:26
【问题描述】:
我想打印日期格式,所以每次我想打印日期时都不需要在导航器中搜索,如下代码所示:
time = now.strftime("%Y-%m-%d %H:%M:%S")
print("time:", time)
我一直在搜索,但没有找到任何关于此的内容。
当您运行help(the_date.strftime) 时,它不会显示可能的参数。
【问题讨论】:
-
..dont need to search in the navigator..- 添加指向您的浏览器收藏夹的链接 -https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
标签: python python-3.x printing parameters strftime