On 01Feb2012 01:39, Paulo da Silva <[email protected]> wrote:
| 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?
Yep.
What about (untested):
process1(mylist[0])
for i in xrange(1,len(mylist)):
process2(mylist[i])
Cheers,
--
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/
The truth is, I will not give myself the trouble to write sense long, for I
would as soon please fools as wise men; because fools are more numerous, and
every prudent man will go with the majority. - Hugh Henry Brackenridge
--
http://mail.python.org/mailman/listinfo/python-list