compiled languages will give you a warning saying there is an unused parameter in testaddition function. However python does not do this. It is just garbaged collected anyways.
Quote:I would just like to understand why the number of arguments does not matter when I run the program.function by nature, can take any number of arguments. In fact you can unpack a list of unknown number of arguments
lister = [1,2,3] def func(*args): print(args[0]) print(args[1]) print(args[2]) func(*lister)
Recommended Tutorials: