DictReader无法在python 3.8.2中打印有序词典

我正在尝试在python中使用DictReader函数。本来应该打印有序词典,但它只能像普通词典一样打印

{'name':'raj','email':'raj@gmail.com','phone':'+12345'}

{'name':'jar','email':'jar@gmail.com','phone':'+54321'}

{'name':'arj','email':'arj@gmail.com','phone':'+23451'}

from csv import DictReader

with open('sample.csv', 'r') as f:
    csv_reader = DictReader(f)
    for row in csv_reader:
        print(row)
评论