Convert ConfigParser.items('') to dictionary
How I did it in just one line.
my_config_parser_dict = {s:dict(config.items(s)) for s in config.sections()}
No more than other answers but when it is not the real businesses of your method and you need it just in one place use less lines and take the power of dict comprehension could be useful.
Have you tried
print connection_string % dict(config.items('db'))
?