A brief note about Python functions
#Function to multiply
def product(a, b):
c = a * b
return c
print(product(10,2))
[Output] 20
#Function to multiply
def product(a, b = 3):
c = a * b
return c
print(product(10))
[Output] 30
#Function to multiply
def product(a, b ,c):
d = a * b * c
return d
val = (10,2,3)
print(product(*val))
[Output] 60
Recommended Posts