Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Why do we use __main__ when we can call a function directly?
Post: RE: Why do we use __main__ when we can call a func...

Thanks a ton.. Now it is clear..
Dave7Swift General Coding Help 5 3,886 Jun-04-2018, 05:01 AM
    Thread: Why do we use __main__ when we can call a function directly?
Post: RE: Why do we use __main__ when we can call a func...

Thanks to both for the quick response. Does this mean that if I am not planning to import, then I can just directly call the functions and not put them under main. Apologies for my ignorance, but sin...
Dave7Swift General Coding Help 5 3,886 Jun-03-2018, 08:29 PM
    Thread: Why do we use __main__ when we can call a function directly?
Post: Why do we use __main__ when we can call a function...

Hi Everyone, I am a newbie to Python. As I was learning Functions, I am not able to understand the difference between calling the function directly and calling it under __main__. Is there any advanta...
Dave7Swift General Coding Help 5 3,886 Jun-03-2018, 07:53 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020