What is correct name of * operator available in Python?

PythonProgramming

The *args argument is called the "variable positional parameter" and **kwargs is the "variable keyword parameter". The * and ** arguments just unpack their respective data structures. 

example

def func(a, b, c):
   return a + b + c
args = (1, 2, 3)
print(func(*args))

Output

This will give the output −

6
raja
Published on 19-Apr-2018 07:54:39
Advertisements