def save(): f=open("test.txt","wt",encoding="utf-8") f.write("我abc\nxyz") f.close() save() 执行后,哪个read()函数可以读出全部内容
(A)def read(): f=open("test.txt","rt") for s in f.readlines():__________print(s,end="") f.close()
(B)def read(): f=open("test.txt","rt",encoding="utf-8") for s in f.readlines():__________print(s,end="") f.close()
(C)def read(): f=open("test.txt","rt",encoding="utf-8") for s in f.readlines():__________print(s) f.close()
(D)def read(): f=open("test.txt","rt",encoding="utf-8") s=f.readline() print(s) f.close()
参考答案
继续答题:下一题