How to pass optional parameters to a function in Python?
In the given code
def greet(name, msg = "Good morning!", msg2="Come on in"):
"""
This function greets the person with given message.
If message is not given, it defaults to "Good
morning!"
"""
print("Hello",name + ', ' + msg + ' '+ msg2)
greet("Archie")
greet("Richie","How do you do?")
What are optional arguments in the python function?