Functions
Scope
site = "TechSnow" # global
def show():
lesson = "Scope" # local: only exists inside show()
print(site, lesson)
show()
# print(lesson) ← NameError: lesson is not definedFunctions
site = "TechSnow" # global
def show():
lesson = "Scope" # local: only exists inside show()
print(site, lesson)
show()
# print(lesson) ← NameError: lesson is not defined