When I call the function using following way,
method_a()
def method_a():
print "I am method A"
I got an error from above code,
Traceback (most recent call last):
File "class1.py", line 1, in <module>
method_a()
NameError: name 'method_a' is not defined
When I call the function following way,
def method_a():
print "I am method A"
method_a()
I got correct output without any errors from the above code
I am method A
What is the difference between above two codes ?. Thanks..