Patricio Valarezo | 26 Jun 2012 19:28
Picon
Gravatar

Re: Generating random alphanumeric codes

El 26/06/12 10:13, Adrian Bool escribió:

On 26 Jun 2012, at 15:53, Sithembewena Lloyd Dube wrote:
Would anyone have tips on how to generate random 4-digit alphanumeric codes in python? Also, how does one calculate the number of possible combinations?

mm... if I undertand you, maybe this could be useful:

http://docs.python.org/library/itertools.html

specially the combinations

http://docs.python.org/library/itertools.html#itertools.combinations

PV
-- patoVala Linux User#280504 Hablando en http://www.elprimoalcahuete.com "The difference between a good haircut and a bad one is seven days." +--[ DSA 1024]----+ | .o.. | | .oo.. | | . =... . | | . = + ... o . | | * .S= + o | | . . o = E | | . o | | | | | +-----------------+

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Gmane