Tech notes

Daily notes about my IT activities.

2012-05-30

python: random sequence of characters

by hackprime

#!python
import string
import random
print ''.join(
    random.choice(
        string.ascii_uppercase + string.ascii_lowercase + string.digits)
    for x in range(length))