Iterate from 2nd element of a huge list
cs at zip.com.au
Wed Feb 1 05:55:24 CET 2012
On 01Feb2012 03:34, Paulo da Silva <p_s_d_a_s_i_l_v_a at netcabo.pt> wrote:
| Em 01-02-2012 03:16, Paulo da Silva escreveu:
| > I think iter is nice for what I need.
| > Thank you very much to all who responded.
| BTW, iter seems faster than iterating thru mylist[1:]!
I would hope the difference can be attributed to the cost of copying
mylist[1:]. Do your timings suggest this? (Remembering also that for
most benchmarking you need to run things many times unless the effect
is quite large).
Cameron Simpson <cs at zip.com.au> DoD#743
Any company large enough to have a research lab
is large enough not to listen to it. - Alan Kay
More information about the Python-list