获取范围随机数
获取 [0,10] 范围的随机数1
random.randint(0, 10)
获取指定长度数字
1 | def get_random_num(**kwargs): |
1 | ''.join(random.choices(string.ascii_uppercase + string.digits, k=6)) |
获取 [0,10] 范围的随机数1
random.randint(0, 10)
1 | def get_random_num(**kwargs): |
1 | ''.join(random.choices(string.ascii_uppercase + string.digits, k=6)) |