Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/geekcomputers/Python
/ generate_password
Function
generate_password
random_password_gen.py:15–18 ·
view source on GitHub ↗
(length=12)
Source
from the content-addressed store, hash-verified
13
14
15
def
generate_password(length=12):
16
characters = string.ascii_letters + string.digits + string.punctuation
17
password =
""
.join(random.choice(characters)
for
_ in range(length))
18
return
password
19
20
21
def
main():
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected