Checking if string element is present in a list with Python?
<p>I have the following piece of code:</p>

<pre><code>self.ignore_dir_extensions = ['xcodeproj']

item = repr(extension.split('/')[0])

print "String: " + item

if item in self.ignore_dir_extensions:
    print "Available: " + item
</code></pre>

<p>Let's say I have this output:</p>

<pre><code>String: 'xcodeproj'
</code></pre>

<p>Expected output:</p>

<pre><code>String: 'xcodeproj'
Available: 'xcodeproj'
</code></pre>

<p>Could anyone help me out here? </p>
