Finding Unique Values

Hey guys!

I could use some help. I may be getting confused with a common problem I have seen on the forums regarding lists and lists of lists. But again, I am not sure.

In the lesson, I am tasked with creating a dictionary called content_ratings and must count the occurrences where a key shows in my data set.

I believe the issue is within line 10:
c_rating = row[10]

But why is c_rating only pulling one key from my list of lists…

Hi @whodafuhhh, welcome to the forums!

Your loop is doing its job and getting row[10], but because there’s no other code indented under the loop, that’s all it does. Once the the loop finishes, then it moves on to the if and else statements with the last c_rating from the loop: '4+'.

1 Like

■■■!!! That is exactly what it was. Can’t believe I missed that.

Thank you! @april.g