Answers for "how to provide default value for paprametersin python"

0

how to provide default value for paprametersin python

# Default Parameter Value
# The following example shows how to use a default parameter value.

# If we call the function without argument, it uses the default value:

######################## EXAMPLE ########################################

def function(parameter = "default value"):
  print("some group of words " + parameter)

function("string")
function("someother string")
function()

####################### OUTPUT ##########################################

some group of words string
some group of words some other string
some group of words default value
Posted by: Guest on January-28-2021

Code answers related to "how to provide default value for paprametersin python"

Python Answers by Framework

Browse Popular Code Answers by Language