Append to List while Iterating
<p>I need this behavior, but would rather have a diminishing list rather than a growing one.
Sequence order is important for this operation.</p>

<pre><code>for item in list:
    if is_item_mature(item):
        ## Process him
    else:
        ## Check again later
        list.append(item)
</code></pre>

<p>but I would rather have it more like this. Does this behave like I think? Any better ways?</p>

<pre><code>while list:
    item = list.pop(0)
    if is_item_mature(item):
        ##Process
    else:
        list.append(item)
</code></pre>
