title: Binary search through strings
body: <p>I'm relatively new to python(3.3) and I'm just trying to do a binary search through a list of words, and cant figure out how to fix my operand types when it comes down to looping through the indices... I continue to get the TypeError. Cant figure out any way around it</p>
  
  <pre><code>def find(L, target):
      start = 0
      end = len(L) - 1
  
      while start &lt;= end: 
          middle = (start + end)// 2 
          midpoint = L[middle]
          if midpoint &gt; target:
              end = midpoint - 1
          elif midpoint &lt; target:
              start = midpoint + 1
          else:
              return midpoint
  </code></pre>
  
  <p>I'm calling the function as so:</p>
  
  <p>L = ["Brian", "Meg", "Peter", "Joe", "Stewie", "Lois"]</p>
  
  <p>find(L, "Joe")</p>