Objective
INI files store configuration in [section] sections with key = value pairs. The configparser module reads them and lets you give a default value.
Instructions
- The file
config.iniexists in the working folder. The first line has the numbernof queries; each one is a linesection key default_value. - Show the value of the key, or the default value if the section or the key does not exist.
3
server host x
server port 0
db name sin
localhost
8080
sin
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise