#Day1 — Nonlocal and Global Keywords in Python
Two keywords used to change the scope of a variable.
Nonlocal and Global KeywordsNonlocal
Error: Variable referenced before assignmentConsider the above case where we have an inner function. We are trying to print a…