list_name[index] = element<br><br>chris<br><br><br><div class="gmail_quote">On Mon, Apr 6, 2009 at 3:49 PM, Joseph Mack NA3T <span dir="ltr">&lt;<a href="mailto:jmack@wm7d.net">jmack@wm7d.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m using a list to hold a 2-D array of pixels, since AFAIK there are no arrays in python. My initial code assigned pixels in varying orders (index could be anything) but I soon found that<br>
<br>
list_name.insert(index, element)<br>
<br>
pushed all elements beyond index one slot further down the list. I could first use `del list_name(index)` first, but this is more complicated than I want (assignement would be a function which did a del and then insert; it would have to be passed the list, index and element).<br>

<br>
I can rearrange my code to fill the list in order from index=0 without causing major grief.<br>
<br>
I assume there&#39;s no simple way of doing the following assignement<br>
<br>
list_name(index) = element<br>
<br>
Is filling the list in order the usual way of handling this problem?<br>
<br>
Thanks Joe<br>
<br>
-- <br>
Joseph Mack NA3T EME(B,D), FM05lw North Carolina<br>
jmack (at) wm7d (dot) net - azimuthal equidistant map<br>
generator at <a href="http://www.wm7d.net/azproj.shtml" target="_blank">http://www.wm7d.net/azproj.shtml</a><br>
Homepage <a href="http://www.austintek.com/" target="_blank">http://www.austintek.com/</a> It&#39;s GNU/Linux!<br>
_______________________________________________<br>
TriZPUG mailing list<br>
<a href="mailto:TriZPUG@python.org" target="_blank">TriZPUG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/trizpug" target="_blank">http://mail.python.org/mailman/listinfo/trizpug</a><br>
<a href="http://trizpug.org" target="_blank">http://trizpug.org</a> is the Triangle Zope and Python Users Group<br>
</blockquote></div><br>