摘要: def get_code(n=4): # 默认生成4位 # 定义一个空字符串 code = '' for i in range(n): # 将生成的随机整数转化为字符串 random_int = str(random.randint(0, 9)) # 0-9之间的整数 # 将ASCII编码转为字母 阅读全文
posted @ 2023-09-21 14:49 wellplayed 阅读(4) 评论(0) 推荐(0) 编辑