标签:-- 字符 log detail nbsp += temp details 字母
https://blog.csdn.net/caoxinjian423/article/details/82873830
import random
randomStr= ""
for i in range(6):
temp = random.randrange(0,3)
if temp == 0:
ch = chr(random.randrange(ord(‘A‘),ord(‘Z‘) + 1))
randomStr += ch
elif temp == 1:
ch = chr(random.randrange(ord(‘a‘),ord(‘z‘) + 1))
randomStr += ch
else:
ch = str((random.randrange(0,10)))
randomStr += ch
print(randomStr)
---------------------
作者:书院二层楼
来源:CSDN
原文:https://blog.csdn.net/caoxinjian423/article/details/82873830
版权声明:本文为博主原创文章,转载请附上博文链接!
标签:-- 字符 log detail nbsp += temp details 字母
原文地址:https://www.cnblogs.com/fengff/p/10207271.html