How can I create basic timestamps or dates? (Python 3.4)

前端 未结 2 1176
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 07:34

As a beginner, creating timestamps or formatted dates ended up being a little more of a challenge than I would have expected. What are some basic examples for reference?

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 08:29

    >>> import time
    >>> print(time.strftime('%a %H:%M:%S'))
    Mon 06:23:14
    

提交回复
热议问题