'''
Created on 2012-5-13
@author: cnp
'''
import string
import random
def random_string(size=6,
chars=string.ascii_letters + string.digits):
return ''.join(random.choice(chars)
for x in xrange(size))
print random_string()
output:
bXwN6t
沒有留言:
張貼留言