Find the average of an unknown number of inputs in Python
Prerequisites: *args and **kwargs in Python
The special syntax *args in function definitions in python is used to pass a variable number of arguments to a function. It is used to pass a non-keyworded, variable-length argument list. The syntax is to use the symbol * to take in a variable number of arguments; by convention, it is often used with the word args. In this article, the task is to find the average of the unknown number of inputs.
Input : 1, 2, 3 Output : 2.00 Input : 2, 6, 4, 8 Output: 5.00
Below is the implementation.