## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

PLUS

# Create a function named multiply that takes any number of arguments. Return the product (multiplied value) of all of the

twoples.py
```
```

Hey, It is asking you to make a function that accepts an *args argument. Then it wants you to loop through it and multiply all of the values.

```def multiply(*args):
product = 1
for item in args:
product *= item
return product
```

Thanks, I just get stuck a lot and i dont know what to do. This helps me understand it more but i dont understand why you do a for item in args.

The *args is allowing you to accept an arbitrary amount of arguments into the function. Meaning all of these would be acceptable when calling the function.

```multiply(1)
multiply(1,2)
multiply(1,2,3)
```

*args takes all of the arguments, like (1,2,3) and packs them into args. You then have to loop through the args to access each value within the function. Does this help?

I like what I see, but I'm confused. Seems like this is doing too much work? How come you can't just say return base *= args

how would a beginner know to use a for loop over this tuple? I understand for each of the args in the tuple, multiply 1* that arg, but I'm confused on how it knows to multiply the total as opposed to just printing 1* arg in a row.

Write a function, named multiply, that takes a value as an argument, then returns that value multiplied by 2.

help plz