2023年12月电子学会青少年软件编程(Python三级)等级考试试卷
客观题
三级
2023
2024-01-05 12:52:10
40次
2023年12月电子学会青少年软件编程(Python三级)等级考试试卷
客观题
三级
2023
2024-01-05 12:52:10
40次
一、单选题
11.
Python是强大的数据处理工具,能方便读写文件。 打开D:\test.csv,文件的内容如下图所示,

>>>f=open(r"D:\test.csv",'r') >>>s1=f.read() >>>s2=f.read() >>>f.close()
运行上述程序,说法正确的是?( )
| A. >>>s1 'hello python!' |
B. >>>s1 'hello word!' |
| C. >>>s1 'hello python!\nhello word!\n' |
D. >>>s2 'hello python!\nhello word!\n' |
【知识点】 电子学会Python三级


