# when save game is loaded, an ugly \n appears at the end of string variables

## Recommended Posts

Not so much of a technical problem as a cosmetic problem, but when loading from game generated save files, a ugly \n for the breaks between lines appear in string variables.

For example:

filen.write("\n")

the above results in in this in the console window:

for example, the classes are variable

what i want to know is if or how i can remove this

##### Share on other sites
ultramailman    1720

You can remove the line

filen.write("\n")


or you can use the strip method on the string,

or you can just write your game save loader in such a way that it will decide which newlines should be ignored.

That's all I can think of now.