Parameter
noun
say it: “puh-RAM-ih-ter” /pəˈræmɪtər/
A name in a function's definition that stands for a value the function needs; it gets its real value, the argument, when the function is called.
What is a parameter in Python?
A parameter is a name in a function definition that stands for a value the function needs. It gets its real value when the function is called.
def greet(name): # name is a parameter
print(f"Hi, {name}!")
greet("Priya") # Hi, Priya!
In a sentence
- “In def greet(name), name is a parameter.”
- “The shipping function has two parameters, the order total and the country.”
Level: Apprentice · More Python terms at this level
Updated