I am probably missing something really simple.
So here is my code:
def test():
return 'Hello!'
if __name__=="__main__":
print test()
On executing python module_name.py
there in no output. When I import the module and execute module_name.test()
I get my the expected output. What am I missing here?
python module_name.py
isn't giving a different outcome. I have edited the question accordingly. – DBS Feb 24 '16 at 02:51` tag instead of `backticks`? Only backticks work in comments. And [thanks should be removed](http://meta.stackexchange.com/a/3021/230282). Just an upvote is enough
– phuclv Feb 24 '16 at 03:17