Python - Passing argument by position


Python matches names by position from left to right.

For instance, if you define a function that requires three arguments, you must call it with three arguments:


def f(a, b, c): print(a, b, c) 
print( f(1, 2, 3) )


Here, we pass by position-a is matched to 1, b is matched to 2, and so on.

Related Topic