第14829题 判断题
判断"该Python代码未关闭文件,存在风险"这一说法是否正确

下面Python代码执行后将输出文件abc.txt的前10个字符,代码如下:

with open("abc.txt","r") as rdFile:
    rdData = rdFile.read()
    print(rdData[:10])
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析