title: What does "len(A) - 1" mean?
body: <p>From "Elements of Programming Interviews in Phyton", page 37, this little program reorders an array of integers so that the even numbers appear first.</p>
  
  <pre><code>def even_odd(A):
      next_even, next_odd = 0, len(A) - 1
      while next_even &lt; next_odd:
          if A[next_even] % 2 == 0:
              next_even += 1
          else:
              A[next_even], A[next_odd] = A[next_odd], A[next_even]
              next_odd -= 1
  </code></pre>
  
  <p>My question: what does the "-1" in "len(A) - 1" do/mean?  </p>