JuHui wrote: > which one has best performance? > > a:for i in range(0,len(a)) > b:for x in a > c:for x,y in enumerate(a)
Read up on the timeit module and figure it out for yourself. The answer will depend on the distribution of your data. > but, it seems I can't get index number with b format..:( Well, that's true, but it is a bit like saying: I cannot find the distance in meters between Paris and London with: for i in range(10): print i --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list