Trouble Understanding this piece of code

Screen Link:

App Profile Recommendation | Dataquest

My Code:

reviews_max = {}
for app in apps_google_list:
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

print(len(reviews_max))

Replace this line with your code

What I expected to happen:
It looks to me that here we’re trying to compare a string which is the app assigned to the variable “name” in the dictionary called reviews_max e.g.Facebook to the number of reviews which is a float.

if name in reviews_max and reviews_max[name] < n_reviews:
    reviews_max[name] = n_reviews

What actually happened:

I’d like to understand what the above actually means.

Replace this line with the output/error

Is it possible to get a walk-through of what exactly is happening here using examples?

I was able to figure it out. Please close the topic. Thank you.