Python: index keyword does not find item in end of list
<p>I have the following string:</p>

<pre><code>monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
</code></pre>

<p>and the following Python script:</p>

<pre><code>from datetime import datetime, date, time
today = datetime.now()
print today

print today
with open('calendar_clean.txt', 'w') as f1:
    with open('calendar.txt', 'r') as f:       
        newline = ""
        end_date_index = -1       
        for line in f:
            items = line.split(",")

            if end_date_index == -1:
                for item in items:
                    print item
                print "finding end_date index"
                end_date_index = items.index('end_date')
                print end_date_index
</code></pre>

<p>When I execute script, the following error message is displayed on the console:</p>

<pre><code>ValueError: 'end_date' is not in list
</code></pre>

<p>If I look for the index of start_date, however, it executes normally, returning correct result.  This is using Python 2.7 on Windows 7 x64.  Any ideas out there?</p>
