FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
learn-python/string_letters.py at master · qyy89/learn-python · GitHub
qyy89
/
learn-python
Public
forked from
tanteng/learn-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
learn-python
/
string_letters.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (10 loc) · 335 Bytes
Breadcrumbs
learn-python
/
string_letters.py
Copy path
File metadata and controls
14 lines (10 loc) · 335 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
random
,
string
def
rand_str
(
num
,
length
=
7
):
f
=
open
(
'Activation_code.txt'
,
'w'
)
for
i
in
range
(
num
):
chars
=
string
.
ascii_letters
+
string
.
digits
s
=
[
random
.
choice
(
chars
)
for
i
in
range
(
length
)]
f
.
write
(
'{0}
\n
'
.
format
(
''
.
join
(
s
)))
f
.
close
()
if
__name__
==
'__main__'
:
rand_str
(
200
)
Back
|
FazBrowse Home
|
New Git URL