title: iPython timeit - only time part of the operation
body: <p>I was attempting to determine, via iPython's <code>%%timeit</code> mechanism, whether <code>set.remove</code> is faster than <code>list.remove</code> when a conundrum came up.</p>
  <p>I could do</p>
  <pre class="lang-py prettyprint-override"><code>In [1]: %%timeit
  a_list = list(range(100))
  a_list.remove(50)
  </code></pre>
  <p>and then do the same thing but with a <code>set</code>.  However, this would include the overhead from the <code>list</code>/<code>set</code> construction.  Is there a way to re-build the <code>list</code>/<code>set</code> each iteration but only time the <code>remove</code> method?</p>