LearnPy Hub
← File Handling problems
Medium

Write and Read a CSV

Read n lines name,score. Write them to scores.csv with csv.writer (header row name,score first). Read it back with csv.reader, skip the header and print the total score.

Input

n, then n lines.

Output

One integer.

Sample 1

Input
2
Mim,80
Rafi,70
Output
150

Sample 2

Input
1
A,5
Output
5
solution.py
Output appears here
Write and Read a CSV · Python practice problem · LearnPy Hub