Invalid syntax when adding to dictionary

My Code:

brands_mean_prices_dict = {}

for brand in common_brands:
    list_of_ads_for_brand=autos[autos['brand']==brand]
    average_brand_price=list_of_ads_for_brand['price_$'].mean()
    avergae_brand_price=int(round(average_brand_price)
    brands_mean_prices_dict[brand]=int(average_brand_price)
    
print(brands_mean_prices)

What I expected to happen:
I expected it to add the mean prices to the dictionary brands_mean_prices_dict

What actually happened:

File "<ipython-input-1-ad03a15740b3>", line 7
    brands_mean_prices_dict[brand]=int(average_brand_price)
                          ^
SyntaxError: invalid syntax

Thank You :slight_smile:

The syntax error is in the above line. Notice that you did not close the parentheses of the int function:

avergae_brand_price=int(round(average_brand_price)

Also, you typed avergae instead of average ins this line. This is not raising error now because of the syntax error, but it will later.