第26337题 单选题
以下Python代码的作用是哪一项?
with open(r"data.txt") as f:
    while True:
        line = f.readline()
        if not line:
            break
        print(line, end="")
A

读取全部内容后一次性打印

B

逐行读取并打印,保留原有的换行

C

跳过空行打印内容

D

倒序打印文件内容

程序运行统计
暂无判题统计