Roulette wheel

Peter Pearson ppearson at nowhere.invalid
Thu Mar 5 15:02:58 EST 2009


On Thu, 05 Mar 2009 18:07:29 +0100, Peter Otten <__peter__ at web.de> wrote:
[snip]
>
> Just for fun here's an alternative version of your function
>
> def generate_crossover(pop, prob):
>     for a, b in zip(*[iter(pop)]*2):
. . .

Good grief!  That's devilishly obscure.

-- 
To email me, substitute nowhere->spamcop, invalid->net.



More information about the Python-list mailing list