import random,string ran_str = ''.join(random.sample(string.ascii_letters + string.digits, 43)) print(ran_str)
随机生成43位a-zA-Z0-9字符串