F
F
fesspav2020-08-23 11:54:57
Python
fesspav, 2020-08-23 11:54:57

Why use double parentheses in a function call?

def func_name(a,b):
    return .....

func_name((5, 1))

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Karbivnichy, 2020-08-23
@fesspav

To pass a tuple of multiple parameters as a single parameter. But you will have an error in your code, since you declared a function with two parameters, and when you call it, you pass one parameter.

D
Dr. Bacon, 2020-08-23
@bacon

Run and check

S
soremix, 2020-08-23
@SoreMix

To pass a tuple

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question