Different variables in a python program have different scope.
Depending on where it is declared, the variable may or may not be accessible inside a function. Sometimes we will need to modify a variable that is present inside a function from outside its current scope.
In such a scenario, we use the global keyword with the variable name.
Python for Absolute Beginners in English Playlist:
• Python for Absolute Beginnners in English
Connect with me on:
LinkedIn
Github
Facebook
Instagram