Parse lines like 'key=value; key2=value2' into a dictionary, correctly handling quoted values and escaped characters.
Constraints
Example
>>> parse_key_value_lines(['name=Alice; age=30', 'city="New York"'])
{'name': 'Alice', 'age': '30', 'city': 'New York'}
>>> parse_key_value_lines(['greeting="Hello\nWorld"', 'path="C:\\temp"'])
{'greeting': 'Hello\nWorld', 'path': 'C:\\temp'}
>>> parse_key_value_lines(['a=1; b=; c="x;y"', 'b=2'])
{'a': '1', 'b': '2', 'c': 'x;y'}
>>> parse_key_value_lines([])
{}
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints