# coding=utf-8
import string
import random

def code_generator(size=12, chars=string.ascii_uppercase + string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

def generate_num(id_length):
    return str(random.randint(10**(id_length-1), 10**id_length-1))
