replace a grids row at index 'ndx' with 'line'

def replace_row(self, line, ndx):
        """ 
        replace a grids row at index 'ndx' with 'line' 
        """
        for col in range(len(line)):
            self.set_tile(ndx, col, line[col])