def v_code(): ret = '' for i in range(5): num = random.randint(0,9) alf = chr(random.randint(65,122)) s = str(random.choice([num,alf])) ret += s return retprint(v_code())
来源: http://www.bubuko.com/infodetail-2559979.html