Keyword Argument:-
Function की argument keyword value का भी प्रयोग करके pass किया जा सकता है
def info( name, age ): print (“Name: “, name) print (“Age “, age) # by keyword arguments info(name=”anil”, age = 30) info(age=25,name=’akhilesh’) |
Note:- i. position के change होने पर value change नहीं होगी।
ii. Keyword argument में order of argument important नहीं है लेकिन number of argument important है
Keyword Argument:-
The argument of the function can also be passed by using the keyword value
def info( name, age ): print (“Name: “, name) print (“Age “, age) # by keyword arguments info(name=”anil”, age = 30) info(age=25,name=’akhilesh’) |
Note:- i. The value will not change if the position changes.
ii. In keyword argument the order of argument is not important but number of argument is important