We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c563bcb commit e99ea87Copy full SHA for e99ea87
1 file changed
Liez-python-code/0001/0001.py
@@ -0,0 +1,20 @@
1
+
2
+# coding = utf-8
3
+__author__= 'liez'
4
5
+import random
6
7
+def make_number(num, length):
8
+ str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
9
+ a = []
10
+ i = 0
11
+ while i < num:
12
+ numstr = ''
13
+ for j in range(length):
14
+ numstr += random.choice(str)
15
+ if numstr not in a: #如果没重复
16
+ a.append(numstr)
17
+ i += 1
18
+ print(numstr)
19
20
+make_number(20,10)
0 commit comments