title: Cleanest way to get last item from Python iterator
body: <p>What's the best way of getting the last item from an iterator in Python 2.6? For example, say</p>
  
  <pre><code>my_iter = iter(range(5))
  </code></pre>
  
  <p>What is the shortest-code / cleanest way of getting <code>4</code> from <code>my_iter</code>?</p>
  
  <p>I could do this, but it doesn't seem very efficient:</p>
  
  <pre><code>[x for x in my_iter][-1]
  </code></pre>