如果文件data.txt中的内容是“hello, world”,则p2的输出结果是什么? - 虎勇网

虎勇网 做网站SEO首选久排!提供SEO文章代写、网站SEO顾问与培训服务。

如果文件data.txt中的内容是“hello, world”,则p2的输出结果是什么?

题号02:如果文件data.txt中的内容是“hello, world”,则p2的输出结果是什么?

with open('data.txt') as f:

    p1 = f.read()

    p2 = f.read()

A.hello, world

B.输出为空,因为文件指针已经读到文件尾部

C.hello

D.world

错误答案:A

正确答案:B



虎勇网推出SEO文章代写服务,550字低至8元,VIP更享有折扣!