Parse CSV line

Write codeHard35 minStripe style

Your task

Parse one line of RFC-4180-style CSV into a list of field strings. Fields are separated by commas. A field may be wrapped in double quotes; inside a quoted field, two consecutive double quotes ('""') represent one literal double quote, and commas inside quotes are literal (not separators). A field is quoted only if its first character is a double quote. Unquoted fields are taken verbatim. Return the list of fields; an empty input string yields ['']. Assume the line is well-formed (every opened quote is closed).

Examples

parse_csv_line(line: str) -> list
Example 1
Inputparse_csv_line("a,\"b,c\",d")
Output["a", "b,c", "d"]