Parse INI config file

Write codeEasy12 minStripe style

Your task

Your deploy tool reads an INI-style file, already split into lines. A line like "[server]" switches the active section (the name is trimmed). A line "key=value" records a setting: split on the first "=" and trim both sides. Blank lines, lines whose first non-space character is "#", and stray lines without "=" are skipped. Return a dict mapping "section.key" to the value; settings that appear before any section header use the bare key. When the same full key is assigned twice, the later assignment wins. Example: ["[server]", "port = 8080"] yields {"server.port": "8080"}.

Examples

parse_deploy_config(lines: list[str]) -> dict[str,str]
Example 1
Inputparse_deploy_config(["[server]", "port = 8080", "host=example.com"])
Output{"server.port": "8080", "server.host": "example.com"}