F
F
fleen2020-04-25 20:57:44
Python
fleen, 2020-04-25 20:57:44

\n write as text in python. How to do it?

Hello. At once I will go to an essence
There is a line of a code where in a file other code is written down, roughly speaking.
And it contains \n, that is, line breaks, but can they be made into text so that they are written as a file not with a new line, but with \n?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-04-25
@fleen

\\n

A
alekssamos, 2020-04-25
@alekssamos

r"это\nсырая\nстрока"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question