13 lines
135 B
Python
13 lines
135 B
Python
|
class Sample:
|
||
|
def foo(self):
|
||
|
print('foo')
|
||
|
|
||
|
def tar(self):
|
||
|
print('bar')
|
||
|
|
||
|
Sample.bar = tar
|
||
|
|
||
|
s = Sample()
|
||
|
s.foo()
|
||
|
s.bar()
|