Screen Link:
https://app.dataquest.io/m/312/lists-and-for-loops
My Code:
opened_file = open('AppleStore.csv')
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
all_ratings = []
apps_data = apps_data[1:]
for row in apps_data:
all_ratings.append(float(row[7])
avg_rating = sum(all_ratings) / len(apps_data)
avg_rating
What I expected to happen:
What actually happened:
File "<ipython-input-1-4e1ca80627d3>", line 10
avg_rating = sum(all_ratings) / len(apps_data)
^
SyntaxError: invalid syntax