验证码
import random def gen_check(): alpha_list = [i for i in range(65,123) if i<91 or i>96] check_str = "" for i in range(5): alpha = chr(random.choice(alpha_list )) check_str += str(random.choice([alpha,random.randint(0,9)])) return check_str for i in range(9): print(gen_check() )