Skip to content

Commit 13e7317

Browse files
author
codehouseindia
authored
Merge pull request codehouseindia#305 from sakisrealop/patch-1
Create randomtextgenerator.py
2 parents 49d4876 + 53281b0 commit 13e7317

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

randomtextgenerator.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import string
2+
import random
3+
4+
# initializing size of string
5+
N = 7
6+
7+
# using random.choices()
8+
# generating random strings
9+
res = ''.join(random.choices(string.ascii_uppercase +
10+
string.digits, k = N))
11+
12+
# print result
13+
print("The generated random string : " + str(res))

0 commit comments

Comments
 (0)