gen_random_string.py
· 142 B · Python
Eredeti
def generate_random_string(n):
letters = string.ascii_letters + string.digits
return ''.join(random.choice(letters) for _ in range(n))
1 | def generate_random_string(n): |
2 | letters = string.ascii_letters + string.digits |
3 | return ''.join(random.choice(letters) for _ in range(n)) |