Stripping "\" at the end
<p>I want to convert a path name that I read from the command window to just the file name. 
For example, convert C:\temp\documents\tempfile to tempfile</p>

<p>I was trying to do something like-</p>

<pre><code>filename=tempfilename.lstrip('\') #this gave me an error

filename=tempfilename.lstrip('\\') #and this did nothing
</code></pre>

<p>What am I doing wrong? 
Thanks for the help ! </p>
