We’ve covered a lot of ground in this series of articles, so let’s now put it all together and work through a real-life application. A common task is to parse a Windows INI file, which are key/value pairs, separated into sections, something like this:
|
1 2 3 4 5 |
[Section 1] val1=hello world val2=42 [Section 2] val1=foo! |
Let’s first write a bit of Python code that reads [...]