## 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!

### 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.  # I'm not so sure how to use unpacking and to get this done, some help would really be appreciated, thank you!

it returns an error saying int is not subscribable

twoples.py
```def multiply(*args):
pos = 0
total = 0
for number in *args:
total += num[pos] * num[pos + 1]
``` Hi Sarvienn, thanks for your question.

The way you've approached it may be slightly over-complicating things. Here are the steps I took to complete the challenge:

• Define the multiply function that takes *args as a parameter
• Make a total variable and assign it the value of 1 (we cannot use 0, since 0 * anything = 0)
• Use a for loop to iterate over the *args like: for arg in args
• Use the '*=' operator to multiply the new arg with the previous one and assign it to total Hey John! first of all thanks for responding!

def multiply(*args): total = 1 for arg in args: total *= arg return total

i typed out the code like this upon your response, however, it still does not work! would you be so kind to analyse this and point out the flaws?

thank you! It's hard to say exactly why because your comment is not formatted like normal code (python takes indents seriously!)

Here's what it should look like based on your code:

```def multiply(*args):
total = 1
for arg in args:
total *= arg
```

Note the return statement is outside the for loop. If the return statement is inside the for loop then it will return after one iteration of the loop. ```          If you are only unpacking, then you want to access the individual members of the collection passed into your function.
So, once you define your function as
def my_func(*args): => means that the parameter "*args" that is being passed is some collection like lists, tuples, or dictionaries and in the body I want to something on individual elements of it one by one.
if that is the case, when calling your function, don't forget to add (*) before the argument
EX:
def my_func(*args):
total = 0
for item in args:
total  += item