tooru honda <[EMAIL PROTECTED]> writes: > The reasoning is as follows: Because the method random() only produces > finitely many possible results, we get modulo bias when the number of > possible results is not divisible by the size of the shuffled list. > > 1. Does shuffle() produce uniform result ?
The nonuniformity is too small to matter. But what is the application? If you are doing something like implementing online poker for real money, you shouldn't use the built-in RNG. It is not designed for what we call adversarial indistinguishability from true randomness. Instead, use the random byte stream available from os.urandom() and derive your random numbers from that. -- http://mail.python.org/mailman/listinfo/python-list