0

I tried using __name__ == "__main__" in my python program, but didn't understand it properly. Below is my code block:

def main():
  print 'hello'
if __name__ == '__main__':
  main()
Robᵩ
  • 154,489
  • 17
  • 222
  • 296
pankmish
  • 676
  • 1
  • 12
  • 34
  • See http://stackoverflow.com/a/419185/1355555 – Teisman Sep 12 '13 at 18:29
  • If I run this program, I get "hello" as output. What do you mean by your program "didn't understand it properly?" Make sure when asking a question you include both your input (which you have), AND your current and expected output. See the "related tips" in [ask] for more info. – Mark Hildreth Sep 12 '13 at 18:59

0 Answers0