760176104 发表于 2017-4-30 12:07:51

python随机字符串

contactgroup_contact

import string
rstr = ''.join(random.choice(string.letters) for i in xrange(len))

import os
random_string = os.urandom(string_length)
#urandom()
#Return a string of n random bytes suitable for cryptographic use.

import random
junk_len = 1024
junk =(("%%0%dX" % junk_len) % random.getrandbits(junk_len *
8)).decode("hex")
页: [1]
查看完整版本: python随机字符串