title: Pythonic way to get last index value of enumerate
body: <p>When I enumerate through a list, is there an intended, pythonic way of obtaining the last index value provided?</p>
  
  <p>Something that would get the equivalent of this:</p>
  
  <pre><code>highest = None
  for index, value in enumerate(long_list):
      # do stuff with index and value
      highest = index
  return highest
  </code></pre>
  
  <p>This approach I don't like. It has hundreds of unnecessary variable assignments. Also, it's ugly.</p>
  
  <p>Background: I have an ordered list build with a RDBS and SQLAlchemy, using numbers as indexes in the relation table. Also I store the highest used index number in the list table, for easy appending of new entries (without extra max lookup on relation table). For when things get messed up, for whatever reason, I included a reorg function, that rebuilds indexes starting from 0 (to remove any gaps). I to that by for-enumerate-iterating over the association table. After that I need to count them or max the index, to get my new highest index value for the list table. That kinda bugs me.</p>
  
  <p>Suggestions? Preferably something that works in 2.7.</p>