Try the following:
self.ignore_dir_extensions = ['xcodeproj']
item = extension.split('/')[0]
print "String: " + repr(item)
if item in self.ignore_dir_extensions:
print "Available: " + repr(item)
You do not want to have item be the result of repr(), because repr() on a string will add quotes, for example:
>>> repr("xcodeproj")
"'xcodeproj'"
>>> print repr("xcodeproj")
'xcodeproj'
>>> print "xcodeproj"
xcodeproj
When you are checking to see if the string exists in the list, you don't want the quotes unless the string you are trying to match also has them.