Keyword Arguments

We'll cover the following...

Functions can also accept keyword arguments! They can actually accept both regular arguments and keyword arguments. What this means is that you can specify which keywords are which and pass them in.

Press + to interact
def keyword_function(a=1, b=2):
return a+b
result = keyword_function(b=4, a=5)
print(result) # 9

You could have also called this function without specifying the keywords. This function ...

Access this course and 1400+ top-rated courses and projects.