Roulette wheel

Peter Pearson ppearson at nowhere.invalid
Thu Mar 5 21:02:58 CET 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