Python是强大的数据处理工具,能方便读写文件。打开D:\test.csv,文件的内容如下图所示,<p><img src="https://up.zaixiankaoshi.com/108299/question/190079cbfa04318e29e1d26effdb8f91" alt="190079cbfa04318e29e1d26effdb8f91"></p><p>>>>f=open(r"D:\test.csv",'r') </p><p>>>>s1=f.read() </p><p>>>>s2=f.read() </p><p>>>>f.close() </p><p>运行上述程序,说法正确的是?( )</p>
A、
>>>s1
'hellopython!'
B、
>>>s1
'helloword!'
C、
>>>s1
'hellopython!\nhelloword!\n'
D、
>>>s2
'hellopython!\nhelloword!\n'
发布时间:2024-12-17 14:31:53