When you want a variable to be available both inside and outside a function, you declare it as a _______ variable.
- Global
- Instance
- Local
- Non-local
To make a variable accessible both inside and outside a function, you declare it as a 'global' variable. It has a global scope.
Loading...
Related Quiz
- The operator // performs _______ division.
- Unlike lists, tuples are _______ in Python, meaning they cannot be modified after they are created.
- You have to develop a Django app that should be able to handle multiple databases. How would you configure the app to work with multiple databases?
- How can you achieve inheritance in Python?
- The ____ method in a metaclass is called when a new object is created from a class.