Python Fundamentals Guided Project 1

I’m struggling with the part of the project where I need to remove duplicates from the data. I have checked the solutions and my code is exactly the same as the code in the solutions but I keep getting a TypeError: unhashable type list. Can anyone help me figure out where my error is?
Here is my code:

reviews_max = {}
android = google_apps_data[1:]

for app in android:
    name = app[0]
    n_reviews = float(app[3])
    
    if name in reviews_max and reviews_max[name] < n_reviews:
        reviews_max[name] = n_reviews
        
    elif name not in reviews_max:
        reviews_max[name] = n_reviews

and here is the error:

TypeErrorTraceback (most recent call last)
<ipython-input-42-781b0d53991f> in <module>()
      6     n_reviews = float(app[3])
      7 
----> 8     if name in reviews_max and reviews_max[name] < n_reviews:
      9         reviews_max[name] = n_reviews
     10 

TypeError: unhashable type: 'list'

Please show us the complete error with number line

I’ve edited it to include the error.

It looks like you try use a list as key in dictionary.
Be sure that the variable name is not a list.
And if you are working in jupyter , execute all the previous cells

I was working in Jupyter and that worked. Thanks for your help.

Why did executing all the previous cells fix the problem?