On 01/02/12 01:39, Paulo da Silva wrote:
Hi!What is the best way to iterate thru a huge list having the 1st element a different process? I.e.: process1(mylist[0]) for el in mylist[1:]: process2(el) This way mylist is almost duplicated, isn't it? Thanks.
Maybe (untested), it = iter(mylist) process1(it.next()) for el in it: process2(el) Duncan -- http://mail.python.org/mailman/listinfo/python-list