package com.demo.test1; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.regex.Matcher; import java.util.regex.Pattern; public class HighArray { private final static int OFFSET = 538309; public static
方法一,通过choice方式生成验证码 此方法生成每次调用crate_code()会生成三个随机数,然后再三个随机数中选择一个,资源调用相对多些 import random def v_code(code_length): res = [] if isinstance(code_length,int): for i in range(code_length): ret = create_code() res.append(ret) return res else: print("请以数字形式输入