A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
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