Is there a better way of doing this?
Fri Mar 6 14:18:00 CET 2009
Chris Rebert <clp2 at rebertia.com> writes:
> for i in range(len(fap)):
"for i in range(len(something))" is a bit of a code smell. You could
selected_population.extend(choice(rw) for x in fap)
The unused "x" is also a slight code smell, but the most obvious cures
involve using the itertools module in ways that are worse than the disease.
More information about the Python-list