标签: python csv
我正在尝试编写一个从CSV文件获取数据的脚本。我的错误是:
ValueError: I/O operation on closed file.
我环顾了互联网,找不到任何东西。我的代码是:
# /usr/bin/python3 import csv with open('/media/netflix.csv', 'r') as c: reader = csv.DictReader(c) for row in reader: print(row['title'])