There is an assignment to create a list of list for the stock price.

I have wrote code to read all 1475 date of data, and would like to put into the list of list. But eventually find out there are 7375 date. What went wrong in the code?


it seems you have duplicated things 5 times
7375/1475 = 5
but i cannot see how you define r in the screen shot.
what is the code above this cell?
In the for loop
you have fill in stuff in the for loop
but how is r created at first?
Do you mean that I have to put nothing in r first before the for loop?
put it another way
if you clear and rerun the notebook (Menu -> Kernel Restart and run all)
what is the len and content of r before the for loop?
Now if I set r =empty list first and then for loop, then I rewrite the code to append, it matches now
nice, that's one of the possible correct ways to do the job