1. 程式人生 > >驗證碼系統

驗證碼系統

import random
def get_code():
code = ''
for i in range(5):
num = random.randrange(10)
s = chr(random.randint(97,122))
single = random.choice([str(num),s])
code +=single
return code