In a few words, they're data that gets "passed into" the function to tell it what to do. Wikipedia has details.

http://en.wikipedia.org/wiki/Function_argument

For instance, your hi() function might need to know who to say hello to:

def hi(person):
    print "Hi there " + person + ", how are you?"

Or a mathematical function might need a value to operate on:

def square(x):
     return x * x
Answer from user149341 on Stack Overflow
🌐
Programiz
programiz.com › python-programming › function-argument
Python Function Arguments (With Examples)
Created with over a decade of experience and thousands of feedback. ... Try Programiz PRO! ... Become a certified Python programmer. Try Programiz PRO! ... In computer programming, an argument is a value that is accepted by a function. Before we learn about function arguments, make sure to ...
Top answer
1 of 8
10

In a few words, they're data that gets "passed into" the function to tell it what to do. Wikipedia has details.

http://en.wikipedia.org/wiki/Function_argument

For instance, your hi() function might need to know who to say hello to:

def hi(person):
    print "Hi there " + person + ", how are you?"

Or a mathematical function might need a value to operate on:

def square(x):
     return x * x
2 of 8
7

This is not a Python question, but rather a generic programming question. A very basic one.


Before answering the question about arguments, and in view of the other questions you asked, it is useful to discuss the concept of variables.
A variable is a named piece of memory where information of interest to the underlying program can be stored and retrieved. In other words, it is a symbolic name, chosen by the programmer, that is associated to its contents. Using various language constructs generally known as assignments, the programmer can read or write the contents of a variable.
It is important to note that the value (i.e. the content) of a variable needn't be defined when the program is written. It is only necessary at run-time. This allows the program to describe actions to be performed on symbolic elements without knowing exactly the value these elements have. Consider this snippet, part of a bigger program:

# ... some logic above
ball_volume = 4.0 / 3 * math.pi * ball_radius
if ball_volume > 200:
   print ("Man, that's a big ball")
# ... more logic below

At the time the program is written one doesn't need to know the actual value of ball_radius; yet, with the assumption that this variable will contain the numeric value of some hypothetical ball, the snippet is capable of describing how to compute the ball's volume. In this fashion, when the program is running, and somehow (more on this later) the ball_radius variable has been initialized with some appropriate value, the variable ball_volume can too be initialized and used, here in the conditional statement (if), and possibly below. (At some point the variable may go out-of-scope, but this concept which controls when particular variables are accessible to the program is well beyond this primer).
In some languages the type of data that may be associated with a particular variable needs to be explicitly defined and cannot change. For example some variables could hold only integer values, other variables string values (text) etc. In Python there is no such restriction, a variable can be assigned and re-assigned to any type of data, but of course, the programmer needs to keep track of this for example to avoid passing some text data to a mathematical function.

The data stored inside variable may come from very different sources. Many of the examples provided in tutorials and introductory documentation have this data coming from keyboard input (as when using raw_input as mentioned in some of your questions). That is because it allows interactive tests by the people trying out these tutorial snippets. But the usefulness of programs would be rather limited if variables only get their data from interactive user input. There are many other sources and this is what makes programming so powerful: variables can be initialized with data from:

  • databases
  • text files or files various text-base formats (XML, JSON, CSV..)
  • binary files with various formats
  • internet connections
  • physical devices: cameras, temperature sensors...

In a nutshell, Arguments, also called Parameters, are variables passed to the function which [typically] are used to provide different output and behavior from the function. For example:

>>> def say_hello(my_name):
...    print("Hello,", my_name, "!")

>>> say_hello("Sam")
Hello, Sam !
>>> customer_name = "Mr Peter Clark"    #imagine this info came from a database
>>> # ...
>>> say_hello(customer_name)
Hello, Mr Peter Clark !
>>>

In the example above, my_name is just like any local variable of the say_hello function; this allows the function to define what it will do with the underlying value when the function is called, at run-time.
At run-time, the function can be called with an immediate value (a value that is "hard-coded" in the logic, such as "Sam" in the example), or with [the value of] another variable (such as customer_name). In both cases the value of the function's my_name variable gets assigned some value, "Sam" and "Mr Peter Clark" respectively. In the latter case, this value is whatever the customer_name variable contains. Note that the names of the variables used inside the function (my_name) and when the function is called (customer_name) do not need to be the same. (these are called the "formal parameter(s)" and the "actual parameters" respectively)

Note that while typically most arguments as passed as input to a function, in some conditions, they can be used as output, i.e. to provide new/modified values at the level of the logic which called the function. Doing so requires using, implicitly or explicitly, the proper calling convention specification (See Argument passing conventions below)


Now... beyond this very basic understanding of the purpose of parameters, things get a little more complicated than that (but not much). I'll discuss these additional concepts in general and illustrate them as they apply to Python.

Default values for arguments (aka "optional" arguments)
When the function is declared it may specify the default value for some parameters. These values are used for the parameters which are not specified when the function is called. For obvious reasons these optional parameters are found at the end of the parameter list (otherwise the language compiler/interpreter may have difficulty figuring out which parameter is which...)

>>> def say_hello(dude = "Sir"):
...     print("Hello,", dude, "!")
...
>>> say_hello()
Hello, Sir !
>>> say_hello("William Gates")
Hello, Bill !            #just kidding ;-)
Hello, William Gates !   # but indeed. works as the original function when param
                         # is specified

Variable number of parameters
In some cases it may be handy to define a function so that it may accept a variable number of parameters. While such lists of parameter values ultimately get passed in some kind of container (list, array, collection...) various languages offers convenient ways of accessing such parameter values.

>>> def add_many(operand1, *operands):
...    Sum = operand1
...    for op in operands:
...       Sum += op
...    return Sum
...
>>> add_many(1, 3, 5, 7, 20)
36
>>> add_many(1, 3)
4

Named Arguments (Keyword Arguments)
With Python and a few other languages, it is possible to explicitly name the arguments when calling the function. Whereby argument passing is by default based a positional basis ("1st argument, 2nd argument etc.), Python will let you name the arguments and pass them in any order. This is mostly a syntactic nicety, but can be useful, in combination with default arguments for functions that accept very many arguments. It is also a nice self-documenting feature.

>>> def do_greetings(greeting, person):
...    print (greeting, "dear", person, "!")
...
>>> do_greetings(person="Jack", greeting="Good evening")
Good evening dear Jack !

In Python, you can even pass a dictionary in lieu of several named arguments for example, with do_greetingsas-is, imagine you have a dictionary like:

>>> my_param_dict = {"greeting":"Aloha", "person":"Alan"}

>>> do_greetings(**my_param_dict)
Aloha dear Alan !

In closing, and while the fancy ways of passing arguments, and the capability for methods to handle variable number of arguments are useful features of various languages, two key concepts need to be mentioned:

Argument passing convention : by value or by reference
So far all the functions we used didn't alter the value of the parameters passed to them. We can imagine however many instances when functions may want to do this, either to perform some conversion or computation on the said values, for its own internal use, or to effectively change the value of the variable so that the changes are reflected at the level of logic which called the function. That's where argument passing conventions come handy...
arguments which are passed by value may be altered by the function for its own internal computations but are not changed at the level of the calling method.
arguments which are passed by reference will reflect changes made to them, at the level of the calling method.
Each language specifies the ways that arguments are passed. A typical convention is to pass integers, numberic values and other basic types by value and to pass objects by reference. Most language also offer keyword that allow altering their default convention.

In python all arguments are passed by reference. However a few variables types are immutable (numbers, strings, tuples...) and they can therefore not be altered by the function.

Implicit "self" or "this" argument of class methods
In object oriented languages, methods (i.e. functions within a class) receive an extra argument that is the value of underlying object (the instance of the class), allowing the method to use various properties members of the class in its computation and/or to alter the value of some of these properties.

in Python, this argument is declared at the level of the method definition, but is passed implicitly. Being declared, it may be named most anything one wishes, although by convention this is typically called self.

>>> class Accumulator:
...   def __init__(self, initialValue = 0):
...        self.CurValue = initialValue
...   def Add(self, x):
...        self.CurValue += x
...        return self.CurValue
...
>>> my_accu = Accumulator(10)
>>> my_accu.Add(5)
15
>>> my_accu.Add(3)
18
Discussions

What are "arguments" in python - Stack Overflow
I am new to python and I am reading an online book. There is a chapter which explains the arguments of what they are and when they are used but I don't understand the explanations that well. Can an... More on stackoverflow.com
🌐 stackoverflow.com
what is a argument in python?
It is a parameter of your function that (1) is used to allow arguments to be put into the function (if you wanted multiple arguments/inputs you could have multiple parameters - def one(input1, input2, input3)) and (2) can be used within the body of the function to generate output. When we type one(10), we ask python ... More on teamtreehouse.com
🌐 teamtreehouse.com
2
April 2, 2018
Please help me understand functions and parameters..
So, taking a swing at it....the parameter(s) in Python are just a way of telling the function that it should be receiving one or more objects/pieces of information. How you write the function determines what type of object those things need to be. Per your example, def funct(param): print(param) Can be used with any type of object that can be printed out to the console; like: func(23) func("Hello, Timmy") will print out the value 23, and then the string "Hello, Timmy" What this, also, means is that you can assign things to variables and pass those variables in to the parameter spot (referred to as an argument when calling the function) and they will still be the object/type of object that you assigned earlier. a = [2, 5, 7, 9] func(a) will print [2, 5, 7, 9] out to the console. Does that help? More on reddit.com
🌐 r/learnpython
26
4
February 3, 2023
Difference between arguments and parameters.
The relationship between a parameter and an argument is like the relationship between a variable and a value. Have you learned how to write your own functions in Python yet? When you write a function, it looks like this. def say_hi_to(person): print("Hello, " + person) In this example, the person variable is the parameter of the function. When someone calls this function with the string "Alice", that string is the argument passed in to the function. Edit: Important note, people often use the two terms interchangeably. It's usually clear from context what they mean, so don't get confused if someone gets the terms wrong. More on reddit.com
🌐 r/learnprogramming
16
1
May 28, 2023
People also ask

What is an argument in Python and why do I need it?
In Python, an argument is the value you pass to a function when you call it. You need it to give the function the data it needs to work properly.
🌐
wscubetech.com
wscubetech.com › resources › python › function-argument
Function Arguments in Python: All Types With Examples
What are the types of Python function arguments I should know?
The main types include positional, keyword, default, and arbitrary arguments (*args, **kwargs). Each type helps you handle data more flexibly.
🌐
wscubetech.com
wscubetech.com › resources › python › function-argument
Function Arguments in Python: All Types With Examples
Can I use default values in Python functions with arguments?
Yes, you can assign default values to function parameters. If you don't pass a value for those arguments, Python uses the default one you’ve defined in the function.
🌐
wscubetech.com
wscubetech.com › resources › python › function-argument
Function Arguments in Python: All Types With Examples
🌐
W3Schools
w3schools.com › python › gloss_python_function_arguments.asp
Python Function Arguments
Information can be passed into functions as arguments. Arguments are specified after the function name, inside the parentheses. You can add as many arguments as you want, just separate them with a comma.
🌐
Real Python
realpython.com › ref › glossary › argument
argument | Python Glossary – Real Python
When defining a function, you specify parameters in its signature. They act as placeholders for the arguments. When you call the function, you provide the arguments that correspond to these parameters. Here’s an example of a function that takes two arguments, and it’s called with both positional and keyword arguments:
🌐
GeeksforGeeks
geeksforgeeks.org › python › types-of-arguments-in-python-1
Types of Arguments in Python - GeeksforGeeks
July 23, 2025 - Default Arguments is a parameter that have a predefined value if no value is passed during the function call. This following example illustrates Default arguments to write functions in Python.
🌐
Built In
builtin.com › software-engineering-perspectives › arguments-in-python
5 Types of Python Function Arguments | Built In
Use keyword-only when you want to prevent users from relying on the position of the argument being passed. In Python, an argument is a value passed to a function during a function call.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › deep-dive-into-parameters-and-arguments-in-python
Python Function Parameters and Arguments - GeeksforGeeks
Types of arguments in python · ... def sum(a,b): print(a+b) sum(1,2) Output · 3 · An argument is a value that is passed to a function when it is called....
Published   July 23, 2025
🌐
WsCube Tech
wscubetech.com › resources › python › function-argument
Function Arguments in Python: All Types With Examples
October 1, 2025 - Learn about Python function arguments with examples, types, and key points in this step-by-step tutorial. Master how to use them effectively in your code.
🌐
Alma Better
almabetter.com › bytes › tutorials › python › arguments-in-python-functions
Arguments in Python Functions
April 19, 2024 - In general, Function arguments are input values that determine the behavior and output of a function. By passing different arguments, we can customize the function's behavior and process different inputs to generate different outputs.
🌐
Scaler
scaler.com › home › topics › python › python function arguments
Python Function Arguments with Types and Examples - Scaler Topics
November 21, 2023 - In Python, arguments with default values (default arguments) must be defined after all the positional arguments without default values. This ensures the interpreter correctly assigns values to arguments when the function is called. For example:
Top answer
1 of 2
1
Arguments are values given to a function. A function takes some inputs and can generate some output. Your arguments are the inputs into that function. To use your example. If we create a function named 'one' that takes one argument, like this: ```Python def one(two): output=two*2 return output ``` You could then use this function to double a value: ```Python x = one(10) y = one("hello") z = one(True) ``` Now, x should equal 20, y = "hellohello" and z = 2. Outside of the definition/scope of your function there is no variable 'two.' It is a parameter of your function that (1) is used to allow arguments to be put into the function (if you wanted multiple arguments/inputs you could have multiple parameters - def one(input1, input2, input3)) and (2) can be used within the body of the function to generate output. When we type one(10), we ask python to run the code in our one function with the parameter 'two' equal to our argument 10. Or "hello" or True, or whatever else we want to try to input. Just play around making and using simple functions and it will make sense very quickly.
2 of 2
1
An argument is a value passed into a function. It can be any value: a number, a string, a float, or a list are just some examples. The argument is then used within the function, and the function would spit out ("return") a value. You may think that some functions don't return values—like print—but functions that "don't return a value" really returns None. Think of it like this: a function is a little machine that takes in argument(s) and spits out a value, depending on that value. For example, you could have a multiply function, and it can take in two arguments. Let's call these arguments num1 and num2. multiply would return the product of num1 and num2. A function in fact doesn't need to take arguments, but it is less common. Usually functions take arguments. :+1: I hope this helps! Happy coding! :zap: ~Alex
🌐
Javatpoint
javatpoint.com › arguments-and-parameters-in-python
Arguments and Parameters in Python - Javatpoint
Examples of Python Curl · Sklearn Model Selection · StandardScaler in Sklearn · Filter List in Python · Python Projects in Networking · Python NetworkX · Sklearn Logistic Regression · What is Sklearn in Python · Tkinter Application to Switch Between Different Page Frames in Python · Append (key: value) Pair to Dictionary · any() in Python · Arguments and Parameters in Python ·
🌐
Reddit
reddit.com › r/learnpython › please help me understand functions and parameters..
r/learnpython on Reddit: Please help me understand functions and parameters..
February 3, 2023 -

I am trying really hard to understand specifically parameters. Particularly, when I define a function I.e. def function(parameter): print(parameter) And then call it function("a simple string") Is the parameter always going to be parameter? It's receiving a value, right? So... Maybe I'm like mentally deficit... or overthinking this, but what if I do..

def function(parameter0, parameter1, parameter3)
    print(parameter0, parameter1, parameter3)

And then call the function

function("Does this cause an error?", "Must have exact values", "for each parameter?")

Am I over thinking this? I'm just following lessons from a PDF. Python for the absolute beginner

I'm must confused and I'm not even sure how or why I'm confused.

  • Edit: formatting and typos

  • Update: Thanks everyone for your help. I think I am understanding it. I believe I'm overthinking it, and over reacting. Sorry for being difficult.

Top answer
1 of 4
5
So, taking a swing at it....the parameter(s) in Python are just a way of telling the function that it should be receiving one or more objects/pieces of information. How you write the function determines what type of object those things need to be. Per your example, def funct(param): print(param) Can be used with any type of object that can be printed out to the console; like: func(23) func("Hello, Timmy") will print out the value 23, and then the string "Hello, Timmy" What this, also, means is that you can assign things to variables and pass those variables in to the parameter spot (referred to as an argument when calling the function) and they will still be the object/type of object that you assigned earlier. a = [2, 5, 7, 9] func(a) will print [2, 5, 7, 9] out to the console. Does that help?
2 of 4
4
Everything in Python is an object (including integers, lists, functions, classes, etc) Variables are just names that refer to objects An object can have several names that refer to it, but each name can only directly refer to a single object (although that object can be a collection of other objects, like in a list or tuple) An area of code where a set of names is accessible is called a namespace (modules (files) and functions both hold a local namespace, and a function can access its local namespace as well as the global namespace of the module it’s being called in) When defining a function, the parameters define the names of the objects that get passed in to its local namespace (regardless of any extra names that may refer to those objects outside a function call), so those names can be used throughout the function (but are not accessible from outside the function) When calling a function the parameters are used to pass in objects this can be positionally, as in your example, or as keyword-arguments that specify which parameter name should be assigned to which object (e.g. my_func(a, 3, param=[], param8=var)) it doesn’t matter if the objects are passed in as literals (e.g. 3, "string") or variables - just the object (the “value”) is passed in and bound to the relevant parameter name Python interprets code from top to bottom If you define a new function with the same name as some other object, then that name now refers to that function, and has no memory of what it used to refer to (just like if you do a=3 and then later in your code do a=4)
🌐
Medium
rs-punia.medium.com › parameters-vs-arguments-in-python-7252ec93da89
Parameters VS Arguments in Python | by Rampal Punia | Medium
July 5, 2024 - Arguments are the actual values that are passed to a function when it is called. In other words, they are the values that are used to replace the placeholders (parameters) in the function definition.
🌐
Reddit
reddit.com › r/learnprogramming › difference between arguments and parameters.
r/learnprogramming on Reddit: Difference between arguments and parameters.
May 28, 2023 -

I'm learning Python, and to get better some concepts I'm using the Feynman technique. I hope that what I'm about to say won't sound too silly.

I'm deepening the concept of arguments and parameters. From the course I'm following, I know that they're used interchangeably and that a possible definition of the difference between the two may be this:

The distinction is that while argument is used with the data passed to the function when the function is called, inside the function the arguments are assigned to variables called parameters.

I'm trying to understand this better. If I ask someone how to make foam, that person may answer: You can make foam by adding water and soap. Now, in the actual world, I don't just use some water and some soap: I can use tap water, rainwater, bottled water... as well as dish soap, shower gel, soap powder, and so on.

foam = water + soap #These are the parameters

water = input("What kind of water are you using? ") 
soap = input("What kind of soap are you using? ") 

#The inputs will be "Tap water" and "Showergel", which are, I guess, the arguments

Did I get this right?

P.S. I promise you I also have friends and a social life

🌐
Reddit
reddit.com › r/python › difference between arguments and parameters
r/Python on Reddit: Difference between Arguments and Parameters
January 15, 2016 -

Hi guys, myself and a colleague have had some issues figuring out the differences between Arguments and Parameters. Coming from a highschool-IT background I was always told that the term is "Parameter passing". My colleague has always been taught "Argument passing" and we can't quite figure out amongst ourselves if one of us has an incorrect understanding.

ie:

def Calculate(x,y) #I believe the () items are *parameters*
    z = x + y
    return z

Calculate(5,6) # I believe the () elements are *Arguments*
    *returns 11*

A few resources online have outlined the difference between Arguments and Parameters as:

Arguments: The actual value passed, ie. Calculate(5,3). Actual Arguments

Parameters: The placeholders ie. Calculate(x,y). Formal Parameters

Others have designated parameters and Arguments as interchangeable terms. My experience with a tutorial (LPTHW, my bad!) are that arguments are passed on a program-by-program basis and that parameters are passing in-program.

ie. $ python MyScript.py arg1 arg2 arg3

If someone could end this dilemma or provide tutorials outlining the difference, I would be very grateful!

🌐
Codecademy Forums
discuss.codecademy.com › frequently asked questions › python faq
What is an argument in python? - Python FAQ - Codecademy Forums
December 16, 2018 - The term ‘argument’ here is not defined? What’s an argument in the context of Python?
🌐
Codecademy
codecademy.com › docs › python › functions › arguments/parameters
Python | Functions | Arguments/Parameters | Codecademy
February 13, 2023 - Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today. ... Parameters are variables that are declared in the function definition. They are usually processed in the function body to produce the desired result. When the function is called, each parameter is assigned the value which was passed as a corresponding argument. For example, the function below contains parameters for a character, a setting, and a skill, which are used as inputs to write the first sentence of a book.
🌐
TechVidvan
techvidvan.com › tutorials › python-function-arguments
Python Function Arguments - Learn the 3 types of Arguments - TechVidvan
March 31, 2020 - As you can see in the function call, the function prints “Hello, World” when no argument is passed. Whereas, if we do pass a value for the argument, the function will print “Hello” followed by the argument value. ... In a function’s definition, a parameter cannot have a default value unless all the parameters to its right have their default values. Python offers a way to write any argument in any order if you name the arguments when calling the function.