有一段Python代码,'test1.txt'内容如下图所示,'test2.txt'文件无内容,执行该代码后,下列说法正确的是?( )
with open('test1.txt') as f: data=f.readline() with open('test2.txt','w') as f: f.write(data)
test2.txt文件中仍旧无内容
test2.txt文件中的内容为'hello world,'
test2.txt文件中的内容为'hello world,I like Python'
test1.txt文件中的内容将丢失