Print all characters in a string
<p>Is there a way to print all characters in python, even ones which usually aren't printed?</p>

<p>For example</p>

<pre><code>&gt;&gt;&gt;print_all("skip
 line")
skip\nline
</code></pre>

<p>Even easier, cast it to a <em>raw string</em> by using <code>"%r"</code>, raw strings treat backslashes as literal characters:</p>

<pre><code>print("%r" % """skip
line""")
skip\nline
</code></pre>

<p>Additionally, use <code>!r</code> in a <code>format</code> call:</p>

<pre><code>print("{0!r}".format("""skip
line"""))
</code></pre>

<p>for similar results.</p>

python string