Check sibling questions

What are keyword arguments?

 

Answer:

If there is a function with many parameters and we want to specify only a few from them, then this can be done by naming the arguments . These arguments are called keyword arguments. When using keyword arguments, the order in which they are specified does not matter.

Example:

def perimeter (b,l):

    p= 2 *(l+b)

    print(p)

 

perimeter(l=2,b=5)

 

 

Are ads bothering you?

CA Maninder Singh's photo - Expert in Practical Accounts, Taxation and Efiling

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.