Thursday, July 2, 2020

Keyword Argument Passing


Here the meaning of the argument is dictated by its name, not by its position.

Look at the below snippet.








Output is






The concept is clear - the values passed to the parameters are preceded by the target parameters' names, followed by the “=” sign.

The position doesn't matter here - each argument's value knows its destination on the basis of the name used.

No comments:

Post a Comment