Thursday, July 2, 2020

Positional Parameter Passing


A technique which assigns the ith (first, second, and so on) argument to the ith (first, second, and so on) function parameter is called positional parameter passing, while arguments passed in this way are named positional arguments.

Let’s consider the below snippet.








Output is




Positional parameter passing is intuitively used by people in many social occasions. For example, it may be generally accepted that when we introduce ourselves we mention our first name(s) before our last name, e.g., "My name's John Doe".

Let's implement that social custom in Python.









Output is



No comments:

Post a Comment