## Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today. # how do you add the items in the list?

how do you add items to the list?

functions.py
```# def add_list(list):
list = []
# summarize([1, 2, 3]) should return "The sum of [1, 2, 3] is 6."
# Note: both functions will only take *one* argument each.
``` Hi Isam,

I don't have access to the challenge right now so I can't check if that's exactly what you are asked for, but this solution is more or less what you are looking for.

```list = [1, 2, 3]

total = 0
for item in list:
total += item

def summarize(list):
total = 0
for item in list:
total += item
return "The sum of {} is {}.".format(list, total)
```

using total = 0 brought up an error saying the total equaled 1, so i changed the 0 to a 5 and got it back as correct. however, i'm honestly not sure why that is, also i don't know what the "+=" does total += item is a shorter way of writing total = total + item.

```total = total + item
total += item #does exactly the same as the previous one
```

The idea here is that you add each number to total.

```total = 0, add 1
total = 1, add 2
total = 3, add 3
total = 6
```

I don't know why it doesn't work for you. Maybe the challenge wants to do it different way. Can't check that since my account is paused at the moment. Sorry. `total += item`

is shorthand for

`total = total + item`

"so i changed the 0 to a 5" does not seem correct. Can you repost your code?

i went back and changed it back to 0 and it worked fine, not sure why i had to make it a 5 the first time.