2020-09-28 | Python | UNLOCK

Python random strdict

randomstr.py

1
2
3
4
5
6
7
8
9
10
import random
'''
def ran():
sl = []
for x in range(8):
sl.append(random.choice("qwertyuopasdfghjklzxcvbnm1234567890"))
return "".join(sl)
'''
for x in range(1000):
with open("dict.txt",'a+') as f:f.write("".join([x for x in range(8) for x in random.choice("qwertyuopasdfghjklzxcvbnm1234567890")])+"\n")

评论加载中