6 lines
192 B
Python
6 lines
192 B
Python
import string
|
|
import random
|
|
|
|
def generate_shortcode(length=6) -> str:
|
|
characters = string.ascii_letters + string.digits
|
|
return ''.join(random.choice(characters) for _ in range(length)) |