- 0
- 0
- 约1.52万字
- 约 22页
- 2026-11-30 发布于湖北
- 举报
计算机Python操作Word试卷
第PAGE1页共NUMPAGES1页
计算机Python操作Word试卷
一、单项选择题(共10小题,每题2分)(每小题只有一个选项符合题意,请把正确选项的字母填在题后括号内)
1.在Python中,使用`python-docx`库打开一个已存在的Word文档,以下哪个方法调用是正确的?
A.document=Document(path/to/document.docx)
B.document=open(path/to/document.docx)
C.document=Document.open(path/to/document.docx)
D.document=load_document(path/to/document.docx)
2.若需在Word文档中插入一个包含Python代码的代码块,使用`python-docx`库时,应使用哪个对象?
A.Paragraph
B.Table
C.Run
D.Anchor
3.在Python中,使用`python-docx`库创建一个新的Word文档并保存,以下哪个代码片段是完整的?
A.document=Document()
B.docu
原创力文档

文档评论(0)