Hello,

I’m on the INTRODUCTION TO FUNCTIONS: MULTIPLE RETURN VALUES section of the Python course. I was playing around with the *function* on the “questions asked by coders” page at What actually happens when returning multiple values in a function?

MY QUESTION: Why does a function **not** accept a tuple as an input for it’s parameters? As I understand it, a tuple is a sequence of items. I tried to use a tuple with 3 items in it to define the 3 parameters of a function, but it gives me an error. Why wouldn’t that work. Here’s what I did:

INPUT

def times_ten(a, b, c):

a = a * 10

b = b * 10

c = c * 10

return a,b,c

```
# Each variable will be assigned to each value in the returned tuple,
# in the order they appear.
t = (3, 4, 8)
times_ten(t)
print(a,b,c)
```

OUTPUT

Traceback (most recent call last):

File “C:/Users/gene/PycharmProjects/Giraffe 3/venv/play.py”, line 11, in

times_ten(t)

TypeError: times_ten() missing 2 required positional arguments: ‘b’ and ‘c’

HOWEVER, when I do the following, the programs runs with no errors:

INPUT

def times_ten(a, b, c):

a = a * 10

b = b * 10

c = c * 10

return a,b,c

```
# Each variable will be assigned to each value in the returned tuple,
# in the order they appear.
a, b, c = (3, 4, 8)
times_ten(3, 4, 8)
print(a, b, c)
print(times_ten(a, b, c))
```

OUTPUT

3 4 8

(30, 40, 80)

The only difference is that in the first instance, I used a tuple, t = (3, 4, 8) to define the parameters of the function and in the 2nd instance I defined the parameter of the function as a, b, c = (3, 4, 8). Thanks.