Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

what is the difference between argument and parameter in python functions?

are these two terms argument and parameter same or they have different meanings in python functions? Please help me with some examples also. can we call actual parameter or actual argument?
can we call formal parameter or formal argument?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Parameters are the variables that accept within the function definition. Arguments are the values that pass into the function when it is called.

For example,

def func(param_1, param_2):
    pass

func(arg_1, arg_2)

In above function, param_1 and param_2 are considered as parameters. The arg_1 and arg_2 are the arguments.

Usually when we call a function with passing arguments it is called as Argument parsing but sometimes it is also referred as parameter passing.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading