Tutorial using named arguments in Python
In this tutorial, consider the following function that takes two arguments…
Yes, you can call the function like this …
greeting = greet('John', 'Doe')
But a better way is to call it using named arguments like this …
greeting = greet(last_name='Doe', first_name = 'John')
It has readability as to what the two arguments are. Plus it does not matter the order in which you put the arguments.