python startswith method
<p>I'm a bit new to python and can't figure out why this is not working.
I have a variable that is something like this:</p>

<pre><code>[u'\n                Data I want              ']
</code></pre>

<p>but I also have variables that are simply:</p>

<pre><code>[u'                more Data I want              ']
</code></pre>

<p>I am running the variables through a loop but I need to strip all the extra stuff around the data.  I created a function to deal with this but I'm not sure why its not working(I'm not sure but I suspect \n is a special character)</p>

<pre><code>def stripName(name):
    name = str(name)
    if name.startswith( "\n" ):
        print "starts with new line"
        name = name[5:-2]
    else:
        print "does not start with new line"
        name = name[3:-2]
    return name
</code></pre>

<p>The problem is the "if name.startswith( "\n" )" never matches..I've looked at other examples and I think I'm doing it as they are.  I even tried<code>if name.startswith( "\n" ) == 'True':</code> but that didn't work either.</p>

<p>Thanks in advance for any insight you guys can give.</p>
