class people():
def __init__(self,name):
self.name=name
def __call__(self):
print("my name is {0.name}".format(self))
me=people("john")
me()
output:
my name is john
class people():
def __init__(self,name):
self.name=name
def __call__(self):
print("my name is {0.name}".format(self))
me=people("john")
me()
output:
my name is john