Parse an INI-style text and return a dictionary of parsed values.
Constraints
Example
>>> parse_config("""
... # comment
... key1 = value1
... [section1]
... a = 1
... b: two
... [section2]
... x = y
... """)
{'': {'key1': 'value1'}, 'section1': {'a': '1', 'b': 'two'}, 'section2': {'x': 'y'}}
>>> parse_config("[s]\n k = v \n")
{'s': {'k': 'v'}}
>>> parse_config("")
{}
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints