1,760
edits
Changes
→Part 2: Global Scope
print('print() in main on schoolName:',schoolName)
</source>
:* The execution of the script '''lab7i.py''' shown above should give your:<source lang="bash">
[rchan@centos7 lab7]$ python3 lab7i.py
print() in main on schoolName: Seneca
print() in function1 on schoolName: SICT
print() in main on schoolName: Seneca
print() in function2 on schoolName: SSDO
print() in main on schoolName: SSDO
</source>
::Note that the function1() call does not modify the global '''schoolName''' object but function2() does.
</source>