14 lines
366 B
Python
14 lines
366 B
Python
import random
|
||
import string
|
||
|
||
# # 生成一个随机整数作为识别码(例如:1000 到 9999)
|
||
# random_id = random.randint(1000, 9999)
|
||
|
||
# 或者生成一个随机的 8 位字母和数字组成的字符串
|
||
random_str = ''.join(random.choices(string.ascii_letters + string.digits, k=12))
|
||
|
||
# 插入命令中
|
||
command = f"random str: {random_str}"
|
||
|
||
print(command)
|