Function gets the value from input parameters and returns the output value, so when we call the function, we pass in the parameter to the function.
It is a basic format of function parameter that goes in order. One weakness is if we mistakenly switch the value with another value, it cannot be easily noticed.
Instead of passing in the values in order, there is another way around not to get mixed up by assigning the value that matches the parameter name.
It has lower possiblities to mistakenly switch the value with another value, and reader can definitely see which value is which by its parameter value.
We can mix positional arguments and keyword arguments, but the important thing is we should keep in mind the order of the positional arguments.
Default value can be assigned in the function parameter, so no value needs to be passed in. Then default value will be automatically passed in.
We should keep in mind that if non-default value parameter comes before default value parameter, it'll raise a syntax error.
def love_you(my_name = "정우성", your_name):
print(f"{my_name} loves {your_name}")
In this case, it throws a syntax error with a message, 'non-default argument follows default argument'.