Does shuffle() produce uniform result ?
tooru_honda at fast-mail.org
Sat Aug 25 04:43:42 CEST 2007
Hi, First of all, my thanks to all of you who replied.
I am writing a gamble simulation to convince my friend that his "winning
strategy" doesn't work. I use shuffle method from a random.SystemRandom
instance to shuffle 8 decks of cards.
As the number of cards is quite small (number of cards is 416), the
nonuniformity doesn't matter as most of you have already said. Just to
avoid argument from my friend, I am considering writing my own randint
and shuffle methods based on os.urandom() though.
More information about the Python-list