def createTeam(org,teamName,quiet=False):

    addPyGithubToPath()
    from github import GithubException

    # Try to create the team

    team = False   # Sentinel to see if it succeeded or failed
    try:
       team = org.create_team(teamName,
                         [],
                         "push");
       if team!=False:
           if not quiet:
               print(" team {0} created...".format(teamName),end='')
           return team
    except GithubException as e:
       
       if ('errors' in e.data and e.data['errors'][0]['code']=='already_exists'):
          if not quiet:
              print(" team {0} already exists...".format(teamName),
                         end='') 
       else:
          print(e)
       
    # If the create failed, try to find the team by name
    # This is our own function and does NOT throw an exception on failure

    team = findTeam(org,teamName)
    if team!=False:
        return team

    team = findTeam(org,teamName,refresh=True)
    if team!=False:
        return team
     
    if not quiet:
        print(
            "ERROR: team {0} could not be created and was not found".format(
                teamName))
        
    return False
Only creates the team---doesn't add any members.
dataset/ETHPy150Open UCSB-CS-Using-GitHub-In-Courses/github-acad-scripts/github_acadwf.py/createTeam