"list index out of range" error
Gabriel Genellina
gagsl-py at yahoo.com.ar
Wed Sep 20 19:09:37 EDT 2006
At Wednesday 20/9/2006 19:39, sam wrote:
>thanks again for your help. that sorted out something that had really
>been bugging me.
Now that your main problem is gone, just a few comments:
- python lists know their length, so you don't need explicit no_lines
and no_lines_2
- list_initial.remove(temp_str) is fairly slow - it has to *scan* the
list to locate temp_str. Just keep its index instead, and use del
list_initial[index]
- as a general sorting routine, that 'zzz....' does not look very
good, try to avoid it.
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list