Hello guys I'm doing a simple command line version of minesweeper game in python 3 and I'm having some trouble with the code.

The idea is to build a minesweeper game with 2d array to represent a 9x9 grid where the bombs are placed randomly.

This is what i did so far:

```
import random

#Function to create the 9x9 grid
def initialize():
    grid=9
    matrix=[[' ' for i in range(grid)] for i in range(grid)]
    return matrix

#Function to print the grid
def printMat( matrix ):
    print('     0   1    2    3    4    5    6    7    8')
    for i in range( 9 ):
        print(i,end=' ')
        for j in range( 9 ):
            print('[',matrix[i][j],']',sep = " ",end=' ')
        print('\n')

#Function to place the bombs
def place_bomb(bomb):
    bombs = 10
    while bombs != 0:
        bomb[random.randint(0,8)][random.randint(0,8)] = "*"
        bombs-=1
    return bomb

#Function to calculate the surrounding bombs 
def surrounding(grid, lin, col):
    size = len(grid)
    surrounding = []

    for i in range(-1, 2):
        for j in range(-1, 2):
            if i == 0 and j == 0:
                continue
            elif -1 < (lin + i) < size and -1 < (col + j) < size:
                surrounding+=lin + i, col + j
    return surrounding

#Function to verify if the player found a bomb and show the updated grid
#Not finished yet
def step(grid, lin, col):
    if grid[lin][col] == '* ':
        print("bomb")
        #return bomb=bomb-1

#Function to verify if the player found all the bombs
#If all the booms were found then return True else return False
#Not finished yet

def status():
   pass

def game():
    game_active=True
    grid=initialize()
    printMat(grid)
    while game_active==True:
        lin = int(input('Choose a line :'))
        col = int(input('Choose a column:'))
        c=place_bomb(grid)
        printMat(c)
        f=surrounding(c,lin,col)
        printMat(f)

game()

```

It return an error from the printMat function:

```
Traceback (most recent call last):
   line 52, in <module>
    game()
   line 50, in game
    printMat(f)
   line 13, in printMat
    print('[',matrix[i][j],']',sep = " ",end=' ')
TypeError: 'int' object is not subscriptable

```

How can I solve this? 
Any help or tip to build the game would be appreciated