def get_stats(level: int, vocation: str):
    'Returns a dictionary with the stats for a character of a certain vocation and level.\n\n    The dictionary has the following keys: vocation, hp, mp, cap.'
    try:
        level = int(level)
    except ValueError:
        return 'bad level'
    if (level <= 0):
        return 'low level'
    elif (level > 2000):
        return 'high level'
    vocation = vocation.lower().strip()
    if (vocation in KNIGHT):
        hp = (((level - 8) * 15) + 185)
        mp = (((level - 0) * 5) + 50)
        cap = (((level - 8) * 25) + 470)
        vocation = 'knight'
    elif (vocation in PALADIN):
        hp = (((level - 8) * 10) + 185)
        mp = (((level - 8) * 15) + 90)
        cap = (((level - 8) * 20) + 470)
        vocation = 'paladin'
    elif (vocation in MAGE):
        hp = (((level - 0) * 5) + 145)
        mp = (((level - 8) * 30) + 90)
        cap = (((level - 0) * 10) + 390)
        vocation = 'mage'
    elif (vocation in NO_VOCATION):
        vocation = 'no vocation'
    else:
        return 'bad vocation'
    if ((level < 8) or (vocation == 'no vocation')):
        hp = (((level - 0) * 5) + 145)
        mp = (((level - 0) * 5) + 50)
        cap = (((level - 0) * 10) + 390)
    exp = (((((50 * pow(level, 3)) / 3) - (100 * pow(level, 2))) + ((850 * level) / 3)) - 200)
    exp_tnl = ((((50 * level) * level) - (150 * level)) + 200)
    return {'vocation': vocation, 'hp': hp, 'mp': mp, 'cap': cap, 'exp': int(exp), 'exp_tnl': exp_tnl}
Returns a dictionary with the stats for a character of a certain vocation and level.

The dictionary has the following keys: vocation, hp, mp, cap.
def get_stats(level: int, vocation: str):
    'Returns a dictionary with the stats for a character of a certain vocation and level.\n\n    The dictionary has the following keys: vocation, hp, mp, cap.'
    try:
        level = int(level)
    except ValueError:
        return 'bad level'
    if (level <= 0):
        return 'low level'
    elif (level > 2000):
        return 'high level'
    vocation = vocation.lower().strip()
    if (vocation in KNIGHT):
        hp = (((level - 8) * 15) + 185)
        mp = (((level - 0) * 5) + 50)
        cap = (((level - 8) * 25) + 470)
        vocation = 'knight'
    elif (vocation in PALADIN):
        hp = (((level - 8) * 10) + 185)
        mp = (((level - 8) * 15) + 90)
        cap = (((level - 8) * 20) + 470)
        vocation = 'paladin'
    elif (vocation in MAGE):
        hp = (((level - 0) * 5) + 145)
        mp = (((level - 8) * 30) + 90)
        cap = (((level - 0) * 10) + 390)
        vocation = 'mage'
    elif (vocation in NO_VOCATION):
        vocation = 'no vocation'
    else:
        return 'bad vocation'
    if ((level < 8) or (vocation == 'no vocation')):
        hp = (((level - 0) * 5) + 145)
        mp = (((level - 0) * 5) + 50)
        cap = (((level - 0) * 10) + 390)
    exp = (((((50 * pow(level, 3)) / 3) - (100 * pow(level, 2))) + ((850 * level) / 3)) - 200)
    exp_tnl = ((((50 * level) * level) - (150 * level)) + 200)
    return {'vocation': vocation, 'hp': hp, 'mp': mp, 'cap': cap, 'exp': int(exp), 'exp_tnl': exp_tnl}