scope of local veriable in python
Answers
Answered by
0
Answer:
In general, a variable that is defined in a block is available in that block only. It is not accessible outside the block. Such a variable is called a local variable.
hope it will help you
Answered by
0
Answer:
☆In general, a variable that is defined in a block is available in that block only. It is not accessible outside the block. Such a variable is called a local variable.
☆the scope of a local variable is the body of the method in which it is declared. In other words, the variable is visible in the body of the method where its declaration appears, but it is not visible on the outside the method.
Similar questions