In Python, is it possible to escape newline characters when printing a string?
In Python, is it possible to escape newline characters when printing a string? Question: I want the newline n to show up explicitly when printing a string retrieved from elsewhere. So if the string is ‘abcndef’ I don’t want this to happen: >>> print(line) abc def but instead this: >>> print(line) abcndef Is there a …