Myles Braithwaite

#!/usr/bin/python

import string
from random import choice

characters = "{0}{1}{2}".format(string.letters, string.digits,
                                string.punctuation)

print ''.join([choice(characters) for i in range(50)])
You might enjoy