# FAQ: Learn Python: Function Arguments - Unpacking Multiple Returns

This community-built FAQ covers the “Unpacking Multiple Returns” exercise from the lesson “Learn Python: Function Arguments”.

Paths and Courses
This exercise can be found in the following Codecademy content:

## FAQs on the exercise Unpacking Multiple Returns

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

## Join the Discussion. Help a fellow learner on their journey.

Agree with a comment or answer? Like () to up-vote the contribution!

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

def multiple_returns(cool_num1, cool_num2):
sum_nums = cool_num1 + cool_num2
div_nums = cool_num1 / cool_num2
return sum_nums, div_nums

sum_and_div = multiple_returns(20, 10)

print(sum_and_div)

# Prints “(30, 2)”

print(sum_and_div[0])

# Prints “30”

sum, div = sum_and_div(18, 9)

print(sum)

print(div)

# Prints “2”

So, there is the code included in the lesson, my question really concerns the last part, but you need it all to understand the question. It says sum, div = sum_and_div(18, 9). But, sum_and_div was never defined as a function, it was only ever declared as a variable that equalled multiple_returns(20, 10). So how does print(sum) print 27? I would think sum, div = multiple_returns(18, 9), and then print(sum) would print 27 and print(div) would print 2. Am I misunderstanding something here? Any help would be appreciated, thanks everyone.

2 Likes

Good catch, I think it’s a blunder, it should be multiple_returns(18, 9), not sum_and_div(18,9) - I tested, the later returns an error, the first works.

2 Likes

Strange that 1 year later it’s not fixed… I wish we’ve had the option to 1) provide feedback for the lessons content and 2) report bugs such as that.

1 Like

Hello, @ovalvoal, and welcome to the Codecademy Forums!

You, @dripdroobul91, and @betamaster50703 are all correct. The example code is incorrect.

``````# sum, div = sum_and_div(18, 9) # INCORRECT!
sum, div = multiple_returns(18, 9) # CORRECT!
``````

Also, `sum` is not a great name for a variable, as it is also the name of a built-in function. See `sum(iterable, /, start=0)`.