What does [i,:] mean in Python?
I guess you are also using numpy to manipulate data (as matrix) ?
If based on numpy,  ans[i,:] means to pick the ith 'row' of ans with all of its 'columns'. 
Note,when dealing with numpy arrays, we should (almost) always use [i, j] instead of [i][j]. This might be counter-intuitive if you used Python or Java to manipulate matrix before.
So I'm finished one part of this assignment I have to do. There's only one part of the assignment that doesn't make any sense to me. 
I'm doing a LinearRegression model and according to others I need to apply ans[i,:] = y_poly at the very end, but I never got an answer as to why. 
Can someone please explain to me what [i,:] means? I haven't found any explanations online.