MCPcopy Create free account
hub / github.com/binkuolo/fastapi / code_number

Function code_number

core/Utils.py:47–58  ·  view source on GitHub ↗

随机数字 :param ln: 长度 :return: str

(ln: int)

Source from the content-addressed store, hash-verified

45
46
47def code_number(ln: int):
48 """
49 随机数字
50 :param ln: 长度
51 :return: str
52 """
53 code = ""
54 for i in range(ln):
55 ch = chr(random.randrange(ord('0'), ord('9') + 1))
56 code += ch
57
58 return code

Callers 1

send_msgFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected