#Python使用docx包读取docx文件
在使用时,首先安装docx,
终端输入:pip install python-docx
import docx
data_path = '/Users/mac/Desktop/中医药3期/古籍文本/1550-急救良方.docx'
data = docx.Document(data_path)
for book in data.paragraphs:
print(book.text)
#Python使用docx包读取docx文件
在使用时,首先安装docx,
终端输入:pip install python-docx
import docx
data_path = '/Users/mac/Desktop/中医药3期/古籍文本/1550-急救良方.docx'
data = docx.Document(data_path)
for book in data.paragraphs:
print(book.text)