- A variable whose scope are in the entire program or which can be excess anywhere in the program are call global varibale
What is local variable ?
- A variable whose scope is limited to some specific region or some areas and which can not excessed by entire program.
In python for excess the global variable inside the function body ,it provide the 'global' keyword
like global variable
# for excess the global variable
- In this program , we make two variable , one of them are global which is outside the function and another is local variable which is inside the function. so for calling the global variable we use global keyword otherwise it will give error that undefined symbol
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!