随机数
16位随机字,包括大写字母,小写字母, 数字
import string import random size = 16 ret = ''.join(random.sample(string.ascii_letters + string.digits + string.ascii_letters + string.digits + string.ascii_letters + string.digits + string.ascii_letters + string.digits + string.ascii_letters + string.digits, size)) print(ret)