We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffdef33 commit 7df3780Copy full SHA for 7df3780
Lecture_17/14_mainFunctioninPython.MD
@@ -0,0 +1,8 @@
1
+# **Main Function In Python**
2
+
3
+**Syntax :** `if __name__ = '__main__'`
4
5
+* Module can be run as a standalone Program
6
+* Module can be imported and used by other module
7
+* Python interpreter sets "special variables", one of which is `__name__` then python will execute the code found within '`__main__`'.
8
+* Python will assign the `__name__` variable of a value of '`__main__`' if its the initial module being run.
0 commit comments