首页 > 代码库 > 随机生成激活码

随机生成激活码

# -*- coding: utf-8 -*-
import random
def getcode():
    s=0123456789ZXCVBNMASDFGHJKLQWERTYUIOP
    code=[]
    for i in range(0,4):
        reg=[]
        for j in range(0,4):
            reg.append(s[random.randint(0,len(s)-1)])
        code.append(‘‘.join(reg))
    return -.join(code)

for i in range(5):
    print(getcode())

 

随机生成激活码