Source code for AutomateTheBoringStuffWithPython.Chapter03.P05_sameName2
"""Same name 2.0
This program has only one variable.
Attributes:
eggs (str): String denoting global variable.
"""
eggs = 'global'
[docs]def spam() -> None:
"""Spam
Reassigns global variable called eggs.
Returns:
None.
"""
global eggs
eggs = 'spam' #: Reassign global variable.
if __name__ == '__main__':
main()