<div class="gmail_quote">On Fri, Feb 13, 2009 at 11:01 AM, bob gailer <span dir="ltr">&lt;<a href="mailto:bgailer@gmail.com">bgailer@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">Moos Heintzen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&lt;snip&gt; I guess I can&#39;t reference [0] on an empty list. (I come from a C background.)<br>
</blockquote></div>
Can you have an empty array in C? If so, it does not have any elements, so you can&#39;t refer to element 0.</blockquote><div><br></div><div>I think the OP was confusing an empty array in C (something like int foo[10] = {}; ) where memory is allocated, just not &quot;used&quot;, to an empty list in Python.</div>
<div><br></div><div>AFAIK, creating an empty list in python is a lot more similar to creating an empty vector in C++.</div><div><br></div><div>-Wayne</div></div>