0

I want to know what the following code means and what each of a, b, and c become:

def addit(a,b,*c):
     return a+b+sum(c)

    addit(3,5,15,21,5)
martineau
  • 119,623
  • 25
  • 170
  • 301

1 Answers1

0

a and b are the first two arguments (3 and 5, respectively, in your example). c is a positional argument - it's a list of all the arguments from the third onward (in your example, it is (15, 21, 5)).

Mureinik
  • 297,002
  • 52
  • 306
  • 350