Python version of PHP's stripslashes
<p>I wrote a piece of code to convert PHP's striplashes into valid Python [backslash] escapes:</p>

<pre><code>cleaned = stringwithslashes
cleaned = cleaned.replace('\\n', '\n')
cleaned = cleaned.replace('\\r', '\n')
cleaned = cleaned.replace('\\', '')
</code></pre>

<p>How can I condense it? </p>
