So, then, what is the global keyword?



So, then, what is the global keyword?..

Answer / Mohammad Rashid Ansari

In Python, the `global` keyword is used to declare a variable as global when it's within a function. This allows the function to access and modify global variables.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is a namespace in python?

1 Answers  


What is __ init__ in python?

1 Answers  


Is c++ or python better?

1 Answers  


How fast can you learn python?

1 Answers  


Write a program in python to produce star triangle.

1 Answers  


What is decorator in python?

1 Answers  


Explain me what is the common way for the flask script to work?

1 Answers  


What is a python method?

1 Answers  


How to concatenate two lists in python?

1 Answers  


Name a few methods that are used to implement functionally oriented programming in python?

1 Answers  


What are the differences in the deep and shallow copy?

1 Answers  


How are arguments passed - by reference or by value?

1 Answers  


Categories