Default Parameter Value

Share

If we call a function without argument, it calls default value.

def our_function(state = “Karnataka”):
print(“I am from “ + state)

our_function(“Maharashtra”)
our_function(“Kerala”)
our_function()
our_function(“Telangana”)

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *