File size: 147 Bytes
a7a3196
 
 
 
1
2
3
4
5
import random, string

def generate_id(length: int = 8) -> str:
    return "".join(random.choices(string.ascii_letters + string.digits, k=length))