Loading...
Loading...
Loading...
Some names hold a comma, so the CSV wraps them in quotes, as in "Shah, Ravi",67. Read the rows and print each as name: mark.
name,mark; a name may be wrapped in double quotes.name: mark.Example
Input
2 "Shah, Ravi",67 Asha,82
Output
Shah, Ravi: 67 Asha: 82
The quoted comma stays inside the name.
Try the problem first. Open one hint at a time.
Do not use split(",") here; let csv.reader handle the quotes.
Each row from the reader is a list of two values.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor