slinky/slinky/__init__.py
2021-12-19 11:51:15 +00:00

8 lines
222 B
Python

import random
import string
def random_string(length: int = 4) -> str:
allowed_chars: str = string.ascii_letters + string.digits
return ''.join(random.SystemRandom().choice(allowed_chars) for _ in range(length))