第11355题 单选题
给定读取gs.txt文件的Python代码,程序执行后列表a的结果是什么?

已知gs.txt存储古诗《春晓》的四行内容,对应代码如下:

with open("gs.txt",'r',encoding="UTF-8") as file:
    lines=file.readlines()
    a=[]
    for line in lines:
        a.append(line[0])
print(a)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析