随机生成激活码
# -*- 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())
我走的很慢,但从不后退