Beginner Issue (Python) - How do I remove words from a list under a certain length
<p>This is what I do:</p>

<pre><code>for word in doc:
    if len(word) &lt; 3:
        doc.remove(word)
</code></pre>

<p>But, if I do this:</p>

<pre><code>for word in doc:
    if len(word) &lt; 3:
        print word
</code></pre>

<p>The results returned are:
'O,'
'Of'
'30'
'4.'
'I.'
'IF'
and more.</p>

<p>Most two character items are removed, but a few still remain, am I doing something wrong?</p>
