题目内容

已知“txt_demo.txt”文件中的内容为“live with smile,we will have harvest!”执行下面程序:txt_file = open('txt_demo.txt', 'r',encoding='utf-8')txt_file.seek(16, 0)print(txt_file.read())输出结果是( )。

A. we will have harvest!
B. live with smile,we will have harvest!
C. live with smile
D. live with smile,we

查看答案
更多问题

使用___________方法可以关闭一个文件对象。

os.path模块中使用___________函数可以进行路径拼接。

os模块中使用________函数可以获取文件列表。

文件打开后不需要关闭。

A. 对
B. 错

答案查题题库