Home »
Python »
Python Variables MCQs
Which keyword is used to assign a global variable?
17. Which keyword is used to assign a global variable?
- global
- local
- No, it has no keyword
Answer: A) global
Explanation:
In Python, the global keyword is used to define a global variable if you are making a global variable inside some function, else you don't require any keyword.