摘要: from docx import Document from docx.shared import Inches document = Document() document.add_heading('Document Title', 0) p = document.add_paragraph('A 阅读全文
posted @ 2021-05-14 18:27 沭水之虾 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 from docx import Document 2 from docx.shared import Inches 3 4 document = Document() 5 6 document.add_heading('Document Title', 0) 7 8 p = document. 阅读全文
posted @ 2021-05-14 18:09 沭水之虾 阅读(146) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import os import re #设定文件路径 path=r'D:\郭鹏历届真题解析2007-2020' i=1 #对目录下的文件进行遍历 for file in os.listdir(path): #判断是否是文件 file_name=os. 阅读全文
posted @ 2021-05-14 16:57 沭水之虾 阅读(236) 评论(0) 推荐(0) 编辑
摘要: import re test_err_date = '如这样的日期2016-12-35也可以匹配到.测试如下.' print(re.search(r"(\d{4}-\d{1,2}-\d{1,2})",test_err_date).group(0)) 阅读全文
posted @ 2021-05-14 16:31 沭水之虾 阅读(412) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import os #设定文件路径 path=r'D:\郭鹏历届真题解析2007-2020' i=1 #对目录下的文件进行遍历 for file in os.listdir(path): #判断是否是文件 file_name=os.path.join( 阅读全文
posted @ 2021-05-14 16:10 沭水之虾 阅读(206) 评论(0) 推荐(0) 编辑