Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Function-definition/Python/function-definition-1.py
Normal file
2
Task/Function-definition/Python/function-definition-1.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
def multiply(a, b):
|
||||
return a * b
|
||||
1
Task/Function-definition/Python/function-definition-2.py
Normal file
1
Task/Function-definition/Python/function-definition-2.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
multiply = lambda a, b: a * b
|
||||
8
Task/Function-definition/Python/function-definition-3.py
Normal file
8
Task/Function-definition/Python/function-definition-3.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class Multiply:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __call__(self, a, b):
|
||||
return a * b
|
||||
|
||||
multiply = Multiply()
|
||||
print multiply(2, 4) # prints 8
|
||||
Loading…
Add table
Add a link
Reference in a new issue