摘要:
os模块是与操作系统交互的一个接口 查看 创建 删除 修改 命令相关 path相关 阅读全文
posted @ 2020-03-02 17:41
孙昌恒
阅读(224)
评论(0)
推荐(0)
摘要:
随机小数 随机整数 随机选择一个返回 随机选择多个返回 打乱列表顺序 阅读全文
posted @ 2020-03-02 17:00
孙昌恒
阅读(176)
评论(0)
推荐(0)
摘要:
```python """ datetime模块 """ from datetime import datetime, timedelta # 1,获取本地时间 print(datetime.now()) # 2020-03-02 11:27:14.453974 print(datetime.today()) # 2020-03-02 11:27:35.061829 # 2,获取当前世界时间 pr 阅读全文
posted @ 2020-03-02 14:23
孙昌恒
阅读(138)
评论(0)
推荐(0)
摘要:
```python """ 小结:时间戳是计算机能够识别的时间;时间字符串是人能够看懂的时间;元组则是用来操作时间的 """ # (线程)推迟指定的时间运行。单位为秒。 print('begin') time.sleep(0.5) # 线程)推迟指定的时间运行。单位为秒。 """ 一、时间戳 """ print(time.time()) """ 二、字符串时间 %y 两位数的年份表示(00-99) 阅读全文
posted @ 2020-03-02 14:20
孙昌恒
阅读(229)
评论(0)
推荐(0)

浙公网安备 33010602011771号