Trouble with lists and loops :(

Hi everyone,

I am having a bit of trouble with lists and loops. Hopefully for you this isn’t complicated.

Here’s the code I wrote:

hairstyles = ["bouffant", "pixie", "dreadlocks", "crew", "bowl", "bob", "mohawk", "flattop"]
prices = [30, 25, 40, 20, 20, 35, 50, 35]
last_week = [2, 3, 5, 8, 4, 4, 6, 2]
total_price = 0
for i in prices:
  total_price.append(i)

The console throws this error:

Traceback (most recent call last):
File "script.py", line 10, in <module>
total_price.append(i)
AttributeError: 'int' object has no attribute 'append'

Here’s my question. Why if I use the print function the whole thing works and displays all the numbers but if I append it doesn’t?

.append() is a list method.

to increase numbers we can use math operators (+)