DEV Community


Posted on • Originally published at

Python Concept Learning Point 2: What is the difference between arguments and parameters?

  • Parameters are the names appear in the function definition.
  • Arguments are the value that actually pass to a function.
  • Parameter control what value(parameter) should pass to a function.
def calcaulate_book_cost (number_of_books):
    return number_of_books * 3

Enter fullscreen mode Exit fullscreen mode

In the above example, number_of_books is the parameter, since it appears in the definition of the function.
4 is the argument, since it appear in the function calling and it is the value actually pass to the function to process.


Python doc (Accessed at 2022 JUN 09)

Top comments (0)