Codington
0 of 6 problems solved • 0%

Exercise prompt

Predict the Quoted Cell

A delivery address contains a comma inside a quoted CSV field. Follow how DictReader maps each field to its header.

Predict the output

What city and numeric result does this row produce?

import csv import io text = 'city,units\n"Harbor, West",4' row = next(csv.DictReader(io.StringIO(text))) print(row["city"], int(row["units"]) + 1)
What will this code print?