can some one explain me the error so i can update the nested loop
NumberOfSSR = int(input("ENTER THE NUMBER OF TEAMS: ")) gamesSSR = ((NumberOfSSR - 1) * NumberOfSSR) // 2 print("YOUR TOURNAMENT HAVE ",gamesSSR, " MATCHES") NewListOfTeamsA = [] for a in range (0, NumberOfSSR): ListOfTeamsA = input("ENTER A TEAM: ") NewListOfTeamsA.append(ListOfTeamsA) print("THE TEAMS THAT HAVE REGISTERED FOR THE TOURNAMENT ARE:\n",NewListOfTeamsA) TeamSize = NumberOfSSR n = 1 for aaa in range(int(TeamSize)): print("GAMES FOR THE ROUND ", "{}".format(n), "\n") NewListOfTeamsA = (NewListOfTeamsA[len(NewListOfTeamsA) - TeamSize:len(NewListOfTeamsA)] + NewListOfTeamsA[1:len(NewListOfTeamsA) - TeamSize]) for aa in range(int(TeamSize)): print("Game", "{}:".format(n), NewListOfTeamsA[0], "vs. ", NewListOfTeamsA[aa + 1]) print("Game", "{}:".format(n), NewListOfTeamsA[0], "vs. ", NewListOfTeamsA[aa + 1]) IndexError: list index out of range