Roulette wheel

mattia gervaz at
Thu Mar 5 21:43:41 CET 2009

>     for a, b in zip(*[iter(pop)]*2):
In the python documentation there is a similar example, well, the obscure 
thing here is the usage of *[iter(pop)]! Then I believe that I can safely 
say that you iterate over the values 0 and 1, 2 and 3 etc. because the 
zip automatically updates the index, in this case using the same sequence 
the index counter is shared and the second sequence start from that 
shared counter. Am I right?

More information about the Python-list mailing list