Python Namespace and Variable Scope Resolution (LEGB)

In this tutorial, we will learn about Python namespace, the scope of a variable and the rules for variable scope resolution. Table of Contents What is Python Namespace?Python Namespace Types and LifecyclePython Variable ScopePython Variable Scope Resolution Rules (LEGB)ConclusionReferences: What is Python Namespace? Python namespaces are containers to map names to objects. In Python, everything … Continue reading Python Namespace and Variable Scope Resolution (LEGB)