import java.util.UUID; /** * 通过UUID随机生成36位.32位唯一识别码(唯一字符串) * @author [J.H] * */ public class Test { public static void main(String[] args) { int i = 0; while (i<10) { String a = UUID.randomUUID().toString(); System.out.println(a); System.out.println(
''' 随机发送n位数字+字母的验证码 ''' import random def get_verified(length): code = '' for i in range(length): num = str(random.randint(0, 9)) ALP = chr(random.randint(65, 90)) alp = chr(random.randint(97, 122)) res = random.choice((num, ALP, alp)) code += res re