Write a function. Test real cases. Improve your solution.
Parse CSV text into a list of dictionaries, using the first row as field names and keeping data rows in their original order. The input is empty or starts with a header whose names are unique and nonempty. Nonblank data records contain the same number of fields as the header. Use comma delimiters and standard double-quote CSV escaping, including commas, doubled quotes, and newlines inside quoted fields. Ignore completely blank record lines. Keep all field values as strings, preserve their spaces, and keep empty fields as empty strings. A header with no data or empty input returns [].
["name,count\nAri,2\nBo,03\n"]
[{"name": "Ari", "count": "2"}, {"name": "Bo", "count": "03"}]["name,note\n\"Ari, Chen\",\"Said \"\"hello\"\"\"\n"]
[{"name": "Ari, Chen", "note": "Said \"hello\""}]["id,note\n1,\"first line\nsecond line\"\n"]
[{"id": "1", "note": "first line\nsecond line"}]["name,note\n\nAri,\n Bo , keep spaces \n"]
[{"name": "Ari", "note": ""}, {"name": " Bo ", "note": " keep spaces "}]["name,note\n"]
[]
[""]
[]
["name,team\r\nAri,Platform\r\nBo,Support\r\n"]
[{"name": "Ari", "team": "Platform"}, {"name": "Bo", "team": "Support"}]Python 3.14 runs in your browser. The first run downloads about 13 MB; your browser can cache it for later visits. Each run starts fresh. Use synchronous functions and core standard-library modules. Network requests, package installs, and interactive input() are unavailable. Return lists, string-key dictionaries, strings, finite numbers, bools, or None. Student code stops after about four seconds, after Python loads. Python engine credits. Test results support self-study and don’t certify proficiency.