Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

keyword arguments python

def calculate(n, **kwargs):
	n += kwargs["add"]
	n *= kwargs["multiply"]
	return n

print(calculate(3, add=3, multiply=5)) # (3+3)*5 = 30
 
PREVIOUS NEXT
Tagged: #keyword #arguments #python
ADD COMMENT
Topic
Name
2+9 =