Wrapping and commenting a block of text for a config file

You are setting newline='' which causes the every character to be separetely commented.

I suppose you wanted to suppress empty lines in the front and back.

Try this:

comment(prefix_count=0, postfix_count=0)
1 Like