📜  如何从dictreader python代码示例中提取密钥

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

代码示例1
>>> import csv
>>> with open('test.csv') as f:
    reader = csv.DictReader(f)
    print reader.fieldnames


['first_name', 'last_name', 'email', 'mobile']