[Python] Read a CSV file with the standard csv module

Created on November 30, 2026

Save these lines as dummy.csv.

a,b,c
1,2,3

Open the file in read mode and pass it to csv.reader. Each iteration yields one row as a list. The expression row[0] selects the first column.

import csv

with open("dummy.csv", "r") as file:
    reader = csv.reader(file)
    for row in reader:
        print(row[0])

Output

a
1
Python CSV