执行以下代码后,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')
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析