import random,string
def genRandomString(slen=10):
return ''.join(random.sample(string.ascii_letters + string.digits, slen))
python生成随机字符串
最新推荐文章于 2024-03-26 20:25:38 发布
import random,string
def genRandomString(slen=10):
return ''.join(random.sample(string.ascii_letters + string.digits, slen))