---
title: "Discussion on \"Main function in Python and how to use __name__ variable?\" | Hashnode"
description: "Discussion on \"Main function in Python and how to use __name__ variable?\". Most of the high level languages such as Java,C/C++ have special main method defined as the execution entry point. This tells interpreter where to start the execution of codes. Its like an entry point of a program. If you don't define a main method i..."
url: "https://hashnode.com/posts/main-function-in-python-and-how-to-use-name-variable/5fa61b2f54cc5b4ad931e6b9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Main function in Python and how to use \_\_name\_\_ variable?](https://shaikhu.hashnode.dev/main-function-in-python-and-how-to-use-name-variable?utm_source=hashnode&utm_medium=feed)

Most of the high level languages such as Java,C/C++ have special main method defined as the execution entry point. This tells interpreter where to start the execution of codes. Its like an entry point of a program. If you don't define a main method i...

Nov 14, 2020 · 4 min read · shaikhu.hashnode.dev  
Updated Jul 26, 2021  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python-projects](https://hashnode.com/tag/python-projects)
-   [#coding](https://hashnode.com/tag/coding)

## Written by

[Javed Shaikh](https://hashnode.com/@Shaikh)

@Shaikh · Phoenix,USA

  
[View profile](https://hashnode.com/@Shaikh)

System Engineer

I am a backend system engineer working for a credit card issuer. My work mostly is based on C/C++ and assembler programming on IBM's TPF mainframe operating system. However I also love Python and JavaScript. I keep trying my hand at building few GUI and CLI tools using Nodejs and Python.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
