[Type A] Working with Functions – Chapter 3 Sumita Arora

|
Table of Contents

10. What is scope? What is the scope-resolving rule of Python?

Solution:

  • Scope refers to the visibility and accessibility of variables within a program.
  • The scope resolving rule of Python is the LEGB rule, which stands for Local, Enclosing, Global, and Built-in. It defines the order in which Python searches for variable names.
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

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