Skip to content

Python Function Parameters

Syntax

Function parameters in Python are variables specified in the function definition to receive input values when the function is called.

def function_name(param1, param2):
# Code to execute
# Calling the function with arguments
function_name(arg1, arg2)

Example

def multiply(a, b):
return a * b
result = multiply(4, 5)
print(result) # Output: 20