Practice Makes Perfect: Why this error?


#1


I'm not really sure why it is still happening? I have also tried to_21 = range(1,22) for the first line and it still is not working. Any feedback would be great! Thank you for the help in advance :).


#2

It says it's not a list. Print it out to see what it is, and consider where that could have come from.


#3

But I did print it out? It's the first set of numbers in brackets.... Right?


#4

If you printed a list when you printed it, and later on it's no longer a list, then it changed at a later time and so you'll need to print it at a later time as well.


#5

I believe I knew what you meant, and it worked, so yay haha. I changed line 5 to just middle_third = to_21[7:14]

Thanks a bunch!


#6

I'm having this same issue but I'm not sure I understand this solution. to_21 is a list that we define, but by printing it becomes not a list...?

Thanks so much.


#7

No. It was assigned a new value after printing.