class A: pass def b(self): print('b') A.b = b a = A()a.b()
Standard input is empty
b
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!