Using the len() function with unicode values
<p>Python newbie here.
I have an excel file with 5000 rows and 1 columns.
I'm importing them into Python and will then use if...else
statements to check for specific conditions.</p>

<p>So my data looks like: (in excel)</p>

<pre><code>Kansas
Colorado
Missouri
Iowa
New York
New Mexico
mycar
car
thisisacar
...
</code></pre>

<p>There here is the code to import it into Python and the conditional 
statements.</p>

<pre><code>import xlrd
wb = xlrd.open_workbook("file.xls")

wb.sheet_names()
sh = wb.sheet_by_index(0)

for item in sh.col(0):
    value = unicode(item.value)
    if value.startswith("car"):
        print value 
        if len(value) == 3:
            print value
</code></pre>

<p>The idea is to print everything with "car", and then print 
value when it only has a length of 3.</p>

<p>The <code>if len(value) == 3</code> doesn't seem to work. help!</p>
