Skip to content

Commit aca2fea

Browse files
authored
Merge pull request Show-Me-the-Code#232 from rosalesjahaziel/master
my solution to 0001
2 parents ef9e731 + a76845a commit aca2fea

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rosalesjahaziel/0001/0001.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import random
2+
import string
3+
4+
5+
# this method use the 'key' to select 10 random characters
6+
def generateCode(count):
7+
for code in range(count):
8+
key = string.upper('0123456789abcefghijklmnopqrstuvwxyz')
9+
code = string.join(random.sample(key, 10))
10+
print(code)
11+
12+
generateCode(10) # generate the amount of codes you send as count

0 commit comments

Comments
 (0)