Answers for "use string argument in functions in python"

0

use string argument in functions in python

def greet(name, msg="Good morning!"):
    """
    This function greets to
    the person with the
    provided message.

    If the message is not provided,
    it defaults to "Good
    morning!"
    """

    print("Hello", name + ', ' + msg)


greet("Kate")
greet("Bruce", "How do you do?")
Posted by: Guest on May-11-2021

Code answers related to "use string argument in functions in python"

Python Answers by Framework

Browse Popular Code Answers by Language