摘要: pip install python-docx -i https://pypi.tuna.tsinghua.edu.cn/simple pip install 包名称 -i https://pypi.tuna.tsinghua.edu.cn/simple(清华镜像源) 阅读全文
posted @ 2020-10-20 14:49 诗诗萌萌 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 安装模块 pip install python-docx -i https://pypi.tuna.tsinghua.edu.cn/simple 相关学习链接 https://blog.csdn.net/u011331731/article/details/94230989 导入 : from do 阅读全文
posted @ 2020-10-20 11:43 诗诗萌萌 阅读(136) 评论(0) 推荐(0) 编辑
摘要: import math math.floor(2.5) :向下取整 math.ceil(2.5) :向上取整 x//y :结果为向下取整 round(x) : 四舍六入五去偶 x > 0.5: 入进一 x < 0.5:舍去小数 x = 0.5:取最近偶数 min() 求最小值 max() 求最大值 阅读全文
posted @ 2019-12-04 23:52 诗诗萌萌 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 生成器属于迭代器 适合迭代器对象:list、dict、tuple、set、str 不适合迭代对象:int、float、bool 迭代器例子: a = [0,1,2,3] iter(a) # 用iter()方法生成迭代对象 print(next(a)) #用next来查询,直到超范围 判读对象是否符合 阅读全文
posted @ 2019-11-21 01:10 诗诗萌萌 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 第一次使用 博客,纪念一下,哈哈哈哈 阅读全文
posted @ 2019-11-20 23:34 诗诗萌萌 阅读(63) 评论(0) 推荐(0) 编辑