def greet(name): print("Hello", name) greet("Rahul") #output 'Hello Rahul' A parameter is the variable listed inside the parentheses in the function definition.
An argument is the actual value that is sent to the function when it is called.
Types of Function Arguments :
def add(a, b): print(a + b) add(5, 10) #output 15 Arguments are passed using parameter names.
def student(name, age): print(name, age) student(age=22, name="Rahul") #output Rahul 22 def greet(name="User"): print("Hello", name) greet() greet("Rahul") #output Hello User Hello Rahul