def add(num1, num2, *args): total = num1 + num2 for arg_item in args: total += arg_item return total print(add(6, 2)) print(add(6, 2, 10, 1, 4)) print(add(6, 2, 10, 1, 4, 100, 50, 1)) print(add(6)) # what is happening here?
num1
num2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)