You may want to output the Dictionary type as it is as a configuration file. In such a case, it is easier to use a script like the one below.
config = {
"A":"a",
"B":"b",
"C":"c"
}
config = '¥n'.join(map('='.join, config.iteritems())
# config= "A=a¥nB=b¥nC=c"
This config is the string you want, so write it out.
Recommended Posts