python生成验证码
import random
def Verifi_code():
code = []
for i in range(6):
if i == random.randint(1,5):
code.append(str(random.randint(1,5)))
else:
temp = random.randint(65,90)
code.append(chr(temp))
a = ''.join(code)
return a
b = Verifi_code()
print b