题目内容

下列选项中,用于获取当前读写位置的是( )。

A. open()
B. close()
C. tell()
D. seek()

查看答案
更多问题

已知“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模块中使用________函数可以获取文件列表。

答案查题题库