Pass optional from one function to another in Python

How can we pass optional or keyword parameters from one function to another in Python?

Gather the arguments using the * and ** specifiers in the function's parameter list. This gives us positional arguments as a tuple and the keyword arguments as a dictionary. Then we can pass these arguments while calling another function by using * and **:
def fun1(a, *tup, **keywordArg):
...
keywordArg['width']='23.3c'
...
Fun2(a, *tup, **keywordArg)
Indexing and slicing operation in sequences
Indexing and slicing operation in sequences - Different types of sequences in python are strings, Unicode strings, lists, tuples, buffers, and xrange objects.......
What is a Lambda form?
The lambda form: Using lambda keyword tiny anonymous functions can be created.......
Role of repr function
Role of repr function - Python can convert any value to a string by making use of two functions repr() or str(). .......
Post your comment