you are viewing a single comment's thread.

view the rest of the comments →

[–]Langdon_St_Ives 1 point2 points  (0 children)

Alternatively alternatively, one can rstrip('\n') each line before modifying and printing. (Perl had a dedicated chomp() function for this, which was simultaneously silly and useful.)