Hi so I am making a minesweeper game and I am a bit stuck with the grid generation part. This is my code so far:

```
from random import randint
import pygame

def MineGen():
    mineamount = 100
    grid_across = 40
    grid_up = 25
    mine_list = []
    my2dthatlist = []
    numacoss = 0
    for i in range (mineamount):
        numacoss = randint(1,40)
        my2dthatlist.append(numacoss)
        numup = randint(1,25)
        my2dthatlist.append(numup)
        mine_list.append(my2dthatlist)
        my2dthatlist = []
    return mine_list

def GridGen():
    grid_across = 40
    grid_up = 25
    GRIDD = [[0]* grid_across for i in range(grid_up)]

    return GRIDD

def MineGrid(GridOutMine, mine_list):
    mineplace = 0
    placeX = 0
    placeY = 0
    for i in range(100):
        mineplace = mine_list[i]
        placeX = mineplace[0]
        placeY = mineplace[1]
        GridOutMine[placeX][placeY] = 1
    print(GridOutMine)

mine_list = MineGen()
GridOutMine = GridGen()
MineGrid(GridOutMine, mine_list)

```

My issue is that i am getting a list index out of range for the

```
GridOutMine[placeX][placeY] = 1

```

part. I don't really know why this is. If you could give me some assistance in what to do, or just some general comments on my code, I would really appreciate it thanks.