随机生成激活码

# -*- 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())

 

posted @ 2017-05-16 12:26  RonyJay  阅读(1816)  评论(0编辑  收藏  举报