Answers for "python turn non printable character to escape string"

1

python turn non printable character to escape string

text_to_print = repr(text_with_newlines_and_other_things)
print(text_to_print)

# example
>>> print("hi\nthere")
hi
there
>>> print(repr("hi\nthere")) 
'hi\nthere'
Posted by: Guest on January-27-2021

Code answers related to "python turn non printable character to escape string"

Python Answers by Framework

Browse Popular Code Answers by Language