title: "list indices must be integers, not str' error when using strptime function
body: <p>I have a list of dates, written as strings, called depart_date</p>
  
  <pre><code>depart_date = ['3/1/2012', '3/4/2012', '3/11/2012']
  </code></pre>
  
  <p>etc.</p>
  
  <p>I'd like to convert them to date objects. This is what I have:</p>
  
  <pre><code>for i in depart_date:
      dep_date = datetime.strptime(depart_date[i], '%m/%d/%Y')
  </code></pre>
  
  <p>and it gives me the TypeError: list indices must be integers, not str.
  I'm not sure why I'm getting this error because I thought the strptime function was supposed to convert strings into date objects.</p>
  
  <p>Any help??</p>