On Jul 1, 5:49 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > Carl Banks <pavlovevide...@gmail.com> writes: > > Instead, call random.shuffle() on the list, and iterate through that > > to get the elements in random order. > > It's better to use random.sample() than random.shuffle().
If you're iterating through the whole list and don't need to preserve the original order (as was the case here) random.shuffle() is better. Aren't-absolutist-opinions-cool?-ly yr's, Carl Banks -- http://mail.python.org/mailman/listinfo/python-list