Parse INI text into a nested dictionary {section: {key: value}}.
[name] starts a section (trim spaces inside the brackets).key = value lines belong to the current section; split on the first = and trim both sides.; or # (after leading spaces) and blank lines are ignored."default".Implement parse_ini. Input: text: str. Returns: dict[str, dict[str, str]].
def parse_ini(text: str) -> dict[str, dict[str, str]]:
config = {}
return config
Run executes the public tests. Submit grades against public and hidden tests.
Parse INI text into a nested dictionary {section: {key: value}}.
[name] starts a section (trim spaces inside the brackets).key = value lines belong to the current section; split on the first = and trim both sides.; or # (after leading spaces) and blank lines are ignored."default".Implement parse_ini. Input: text: str. Returns: dict[str, dict[str, str]].
def parse_ini(text: str) -> dict[str, dict[str, str]]:
config = {}
return config
Run executes the public tests. Submit grades against public and hidden tests.