How to iterate through an enumerate object and print all the index-item pairs using next() function?
<p>I have the following program</p>

<pre><code>enum1 = enumerate("This is the test string".split())
</code></pre>

<p>I need to iterate through enum1 and print all the index-item pairs by using next() function.</p>

<p>I try to get the index-item pairs by doing the following</p>

<pre><code>for i in range(len(enum1)):
    print enum1.next()
</code></pre>

<p>It throws me an error showing <code>len()</code> can't be applied to an enumeration.</p>

<p>Could anyone suggest me any such way by which I would be able to iterate through this enum to print all the index-item pairs using <code>next()</code> function?</p>

<p>Note: My requirement is to use <code>next()</code> function to retrieve the index-item pairs</p>
