![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
KeanuSan
这个作者很懒,什么都没留下…
展开
-
使用Python编写一个输入合规时间计算时间之和(时分秒)
代码如下: import datetime def time_split(t): t = str(t).split(":") if len(t) == 2: t_h = 0 t_m = t[0] t_s = t[1] if len(t) == 3: t_h = t[0] t_m = t[1] t_s = t[2] return t_h, t_m, t_s def time_原创 2021-05-06 13:24:48 · 879 阅读 · 2 评论 -
Python创建文件夹
import os """ 批量创建文件夹,用来存放按日存储的日常工作文件 """ def mkdir(all_path): # 获取文件是否存在 folder = os.path.exists(all_path) if not folder: # os.makedirs 创建文件时如果路径不存在会创建这个路径 os.makedirs(all_path) print("创建文件夹的目标位置是:" + all_path)原创 2021-02-25 15:26:10 · 233 阅读 · 1 评论