Programming Tips
Published in

Programming Tips

#Day1 — Nonlocal and Global Keywords in Python

Two keywords used to change the scope of a variable.

Nonlocal

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store