returns the skill by name in a character

def get_skill_by_name(nme, character):
    """
    returns the skill by name in a character
    """

    for ndx, sk in enumerate(character["skills"]):
        if sk["name"] == nme:
            return ndx
    return 0