Re: [Tutor] question about "__main__"

2015-11-16 Thread Alan Gauld
On 16/11/15 15:30, CUONG LY wrote: Hello, I’m learning Python. Hello, welcome. I want to know what does the following line represent if __name__ == ‘__main__’: The short answer is that it tests whether the file is being imported as a module or executed as a program. If its being imported

[Tutor] question about "__main__"

2015-11-16 Thread CUONG LY
Hello, I’m learning Python. I want to know what does the following line represent and why I see some python codes have two of them ? if __name__ == ‘__main__’: Thanks in advance Cuong ___ Tutor maillist - Tutor@python.org To unsubscribe or