python产生随机字符串

  sre


import random
import string

ran_str = ”.join(random.sample(string.ascii_letters + string.digits, 8))

print ran_str

One Reply to “python产生随机字符串”

LEAVE A COMMENT

Captcha Code