from the Library Reference:<br><table class="realtable"><tbody><tr><td class="center" valign="baseline"><code><var>s</var>.insert(<var>i</var>, <var>x</var>)</code></td>
        <td class="left">same as <code><var>s</var>[<var>i</var>:<var>i</var>] = [<var>x</var>]</code></td>
        <td class="center">(5)</td></tr></tbody></table><br><br><div><span class="gmail_quote">On 3/7/06, <b class="gmail_sendername">John Salerno</b> <<a href="mailto:johnjsal@nospamgmail.com">johnjsal@nospamgmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Let me apologize in advance for what I'm sure is an achingly simple<br>
question, but I just can't find the answer in either of my Python books.<br>I've tried a few tests with the interactive prompt, but they don't work<br>either.<br><br>All I'm trying to do is insert an item into a list, like so:
<br><br>L = [1, 2, 4]<br><br>and I want to insert the integer 3 into the position L[2], so that the<br>list reads [1, 2, 3, 4]<br><br>I've tried all kinds of combinations of slicing assignment, but I always<br>get:<br><br>
TypeError: can only assign an iterable<br><br>Can someone please embarrass me with the simple answer?  :)<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list
</a><br></blockquote></div><br>