greetings! i am beginner with python and confused what the if - TopicsExpress



          

greetings! i am beginner with python and confused what the if __name__ == __main__: main() means below is the script.--> #!/usr/bin/python def main(): f = open(sample.txt, w+) #writing some random stuff to file for i in range(10): f.write(this is a line %d\r\n % (i+1)) #close file when done f.close() if __name__ == __main__: main() #### i can call the function with main() only and it works thanks
Posted on: Sun, 26 Oct 2014 11:03:27 +0000

Trending Topics



e="min-height:30px;">
Found on Craigslist Admin Assistant Wanted (Northside of
Oh my gawd, can we just put the global warming crap in the trash
Can ELECTRICITY pass through Flash light of the Digital camera to
"...¿Si yo tengo un manzano en mi huerto también voy a tener que
My Dad, Dominic Cullen (Don or Donnie) passed away 27th May this
A great photograph of Michael Wittman and his crew... As I was

Recently Viewed Topics




© 2015