创建随机码!!

import random
def v_code():
    code = ''
    for i in range(5):
            num = random.randint(0,9)
            alf = chr(random.randint(65,122))
            add = random.choice([num,alf])
            code += str(add)
            return code
print(v_code())
原文地址:https://www.cnblogs.com/huangjinshan/p/6168744.html