下面哪种方法读文件“input.txt”是正确的()。 A、in_file = open('input.txt','w')B、in_file = open('input.txt',r)C、in_file = open('input.txt','r')D、都不正确
下面哪种方法读文件“input.txt”是正确的()。
A、in_file = open('input.txt','w')
B、in_file = open('input.txt',r)
C、in_file = open('input.txt','r')
D、都不正确
相关考题:
下面关于java中输入/输出流的说法正确的是()。A.FileInputStream与FileOutputStream类用读、写字节流B.Reader与Writer类用来读、写字符流C.RandomAccessFile既可以用来读文件,也可以用来写文件D.File类用来处理与文件相关的操作
假定用下面的语句打开文件:Open“Filel.txt”for Input As#1则不能正确读文件的语句是A.Input#l,ch$B.Line Input#1,ch$C.ch$=Input$(5,#1)D.Read#1,ch$
假定用下面的语句打开文件: OpenFilcl.txtFor Input As#1 则不能正确读文件的语句是( )。A.Input#1,ch$B.Line Input#1,ch$C.ch$一Input$(5,#1)D.Read#1,ch$
(24)假定用下面的语句打开文件:Open"File l .txt"For Input As#1则不能正确读文件的语句是A)Input # 1, ch$B)Line Input # 1, ch$C)ch$=Input$(5, # 1)D)Read # 1, ch$
【多选题】下面哪些是python读对象提供的“读”方法?A.readlines()B.read()C.readtext()D.readline()