from random import Random # 随机生成token def get_token(): length_r = 32 token = '' chars = '01' length = len(chars) - 1 random = Random() for i in range(length_r): token += chars[random.randint(0, length)] return token
感觉还行的话,帮忙点个赞吧
from random import Random # 随机生成token def get_token(): length_r = 32 token = '' chars = '01' length = len(chars) - 1 random = Random() for i in range(length_r): token += chars[random.randint(0, length)] return token
感觉还行的话,帮忙点个赞吧