[Type A] Working with Functions – Chapter 3 Sumita Arora
Table of Contents
12. When is the global statement used? Why is its use not recommended?
Solution:
- The global statement is used to declare that a variable inside a function is global.
- Its use is not recommended because it can make code harder to understand and maintain, as it introduces dependencies between functions and can lead to unexpected behavior.