Live Engine
Select Topic
easy*args & **kwargs
A developer uses *args to accept a variable number of positional arguments. What does this print, and what type is args inside the function?
Code
def total(*args):
print(type(args))
return sum(args)
print(total(1, 2, 3))
print(total(10, 20, 30, 40, 50))
print(total())