String manipulation question. Had to parse a large string that comes in a format similar to csv.
Implement parse_csv_like(text), where records are separated by or \r , fields by commas, and quoted fields may contain commas or newlines. Inside a quoted field, a literal quote is represented by two consecutive quotes. Return a list of records, where each record is a list of field strings; inputs are well-formed. Empty fields must be preserved, and an empty input returns an empty list.
Function signature: def parse_csv_like(text):
def parse_csv_like(text):