← Back to Files
Question 416
Second Column Only
Second Column Only
The write step stores three city rows in cities.csv with csv.writer (the file is opened with newline="" so the csv module controls line endings); the third row comes from input. Open the file for reading, build a csv.reader over it, loop over the rows and print row[1], the temperature column, one value per line. Input: two lines, a city name then a temperature, no prompt. Import only csv.
Expected Output:
21 24 19
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
FilesCSV
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.