Skip to content
techsnow

Functions

Scope

site = "TechSnow"        # global

def show():
    lesson = "Scope"     # local: only exists inside show()
    print(site, lesson)

show()
# print(lesson)  ← NameError: lesson is not defined