Using configparser to remove section name only but retain its key and value pairs
Using configparser to remove section name only but retain its key and value pairs Question: I am trying to remove the section from ini file but i want to retain that section’s keys and values. I tried to remove a section like this with open(‘testing.ini’, "r") as configfile: parser.read_file(configfile) print(parser.sections()) parser.remove_section(‘top’) print(parser.sections()) with open(‘testing.ini’, "w") …