执行给定的Python文件操作代码后,file.txt文件的内容是什么?
with open('file.txt', 'w') as f:
f.write('First line\n')
with open('file.txt', 'a') as f:
f.write('Second line\n')
with open('file.txt', 'r+') as f:
f.seek(0)
f.write('Replaced first line\n')
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析