Which keyword is used to assign a global variable?

17. Which keyword is used to assign a global variable?

  1. global
  2. local
  3. 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.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.