def _nbaLeague(x):
    """Takes in initials of league and returns numeric API Code

    Input Values: "NBA", "WNBA", or "NBADL"

    Used in: _Draft.Anthro(), _Draft.Agility(), _Draft.NonStationaryShooting(), 
    _Draft.SpotUpShooting(), _Draft.Combine()

    """
    leagues = {'NBA': '00', 'WNBA': '10', 'NBADL': '20'}
    try:
        return leagues[x.upper()]
    except:
        raise ValueError(
            "Please use one of the following values for League: 'NBA', 'WNBA', 'NBADL'"
            )
