#Day1 — Nonlocal and Global Keywords in Python

Two keywords used to change the scope of a variable.

Rahul Banerjee
Programming Tips
Published in
2 min readMar 21, 2021

--

Nonlocal and Global Keywords

Nonlocal

Error: Variable referenced before assignment

Consider the above case where we have an inner function. We are trying to print a…

--

--