Python Web Development Company in Delhi
Python Development

Rules for local and global variables in python

What are the rules for local and global variables in python?

References to variables inside of a function become immediately global in Python.

If a variable inside the body of the function receives a value,

It presumed to be local until you specifically declare it to be global.

Enquiry Now

Leave a Reply

Your email address will not be published. Required fields are marked *