#!/usr/bin/python
#filename:method.py
class Person:
    def sayHi(self):
        print('Hello, how are you?')

p=Person()
p.sayHi()
#This short example can also be written as Person().sayHi()

#!/usr/bin/python
#filename:method.py
class Person:
    def sayHi(self):
        print('Hello, how are you?')

p=Person()
p.sayHi()
#This short example can also be written as Person().sayHi()

#!/usr/bin/python #filename:method.py #This short example can also be written as Person().sayHi()