Python Global Variable: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "---- __NOTOC__" to "---- __NOTOC__") |
m (Text replacement - ". ----" to ". ----") |
||
Line 7: | Line 7: | ||
** a [[Perl Global Variable]]. | ** a [[Perl Global Variable]]. | ||
* <B>See:</B> [[Python Code]], [[Python Data Structure]]. | * <B>See:</B> [[Python Code]], [[Python Data Structure]]. | ||
---- | ---- | ||
---- | ---- |
Latest revision as of 00:03, 23 September 2021
A Python Global Variable is a Python variable that is a global software variable.
- Example(s):
__name__
__version__
- Counter-Example(s):
- See: Python Code, Python Data Structure.
References
2013
- https://docs.python.org/2/tutorial/modules.html
- … A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) is available as the value of the global variable
__name__
.
- … A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) is available as the value of the global variable