My Code:
I don’t understand why I am getting the actual length to be 1. someone please help me identify where the issue is
reviews_max = {}
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
print('Expected length:', len(android) - 1181)
print('Actual length:', len(reviews_max))
What I expected to happen:
Expected length: 9659
Actual Length: 9659
What actually happened:
Expected length: 9659
Actual Length: 1
Replace this line with the output/error
Expected length: 9659
Actual Length: 1