📜  如何从 csv python 代码示例创建一个元组

📅  最后修改于: 2022-03-11 14:45:35.235000             🧑  作者: Mango

代码示例1
import csv

with open('file.csv', newline='') as f:
    reader = csv.reader(f)
    data = [tuple(row) for row in reader]

print(data)