Advanced Python Arguments
#Keyword Arguments
def my_function(a, b, c):
#Do this with a
#Then do this with b
#Finally do this with c
my_function(c=3, a=1, b=2)
#Arguments with Default Values
def my_function(a=1, b=2, c=3):
#Do this with a
#Then do this with b
#Finally do this with c
my_function(b=5)
- To modify one of those inputs to give a custom value for b
- Rather than let it be equal to the default value of 2, I can just change the value of b, b = 5. And a and c will still take on their default value