第15561题 单选题
关于以下Python写入CSV文件的代码语句解释,不正确的是?

有如下程序代码:

import csv    #  ①
headers = ['学号','姓名','分数']
rows = [['202001','张三','98'],
        ['202002','李四','95'],
        ['202003','王五','92']]
with open('score.csv','w',encoding='utf8',newline='') as f : #  ②
    writer = csv.writer(f)   #  ③
    writer.writerow(headers)
    writer.writerows(rows)   #  ④
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析