<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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])