12 lines
231 B
Python
Executable File
12 lines
231 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import secrets
|
|
import string
|
|
|
|
def random_string(length: int):
|
|
symbols = string.punctuation + string.ascii_letters + string.digits
|
|
ret = ""
|
|
for _ in range(length):
|
|
ret += secrets.choice(symbols)
|
|
return ret
|