My code works perfectly fine and I would just like to clean it up a little. From the research I've done, I cannot find anyone that used a multidimensional list to a game of TTT. I'm just looking for a way to make this code prettier than it is right now.grid = [['-','-','-'],       ['-','-','-'],       ['-','-','-']]turn = 'x'stl = Trueprint(Please use this format: row/col)rounds = 0def printGrid(grid):    for i,j,k in grid:        b = print(i,j,k)def place(grid,turn,row,col):    if grid[row][col] == '-':        grid[row][col] = turn        return True    else:        print(Please select an untaken postion\n)        return Falsewhile stl:    rounds += 1    print(Round %i! % rounds)    try:        printGrid(grid)        print(\nIt is %s's turn.\n % turn)        inp = input(What position do you want to place your symbol? (row/col 1-3/1-3) )        row,col = inp.split('/')        row = int(row)-1        col = int(col)-1        print()        a = place(grid,turn,row,col)        if a == True:            if turn == 'x':                turn = 'o'            else:turn = 'x'    except(IndexError,ValueError):print(\nPlease select a viable position.\n)    print('----------------------------------\n')    if ['x','x','x'] in grid:        print(X Victory! You won in %i rounds!\n % rounds)        printGrid(grid)        stl = False    elif ['o','o','o'] in grid:        print(O Victory! You won in %i rounds!\n % rounds)        printGrid(grid)        stl = False    if grid[0][0] == 'x' and grid[1][0] == 'x' and grid[2][0] == 'x':        print(X Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][1] == 'x' and grid[1][1] == 'x' and grid[2][1] == 'x':        print(X Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][2] == 'x' and grid[1][2] == 'x' and grid[2][2] == 'x':        print(X Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][0] == 'x' and grid[1][1] == 'x' and grid[2][2] == 'x':        print(X Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][2] == 'x' and grid[1][1] == 'x' and grid[2][0] == 'x':        print(X Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][0] == 'o' and grid[1][0] == 'o' and grid[2][0] == 'o':        print(O Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][1] == 'o' and grid[1][1] == 'o' and grid[2][1] == 'o':        print(O Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][2] == 'o' and grid[1][2] == 'o' and grid[2][2] == 'o':        print(O Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][0] == 'o' and grid[1][1] == 'o' and grid[2][2] == 'o':        print(O Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = False    elif grid[0][2] == 'o' and grid[1][1] == 'o' and grid[2][0] == 'o':        print(O Victory! You won in %i rounds! % rounds)        printGrid(grid)        stl = FalseAs you can see, the last portion of the code is gross. I would just like to see if there is a better way of dealing with this.
Making Tic-Tac-Toe winning check more efficient
python;python 3.x;tic tac toe