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
  • 112,593
  • 23
  • 157
  • 280

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
  • 277,661
  • 50
  • 283
  • 320