Computer Science, asked by rishalx12, 2 months ago

difference between local variable and global variable with suitable example in python

Answers

Answered by Anonymous
6

 \huge{ \boxed{ \pink{ \boxed{ \mathfrak{ \red{AnsWer}}}}}}

Local variable is declared inside a function whereas Global variable is declared outside the function. Local variables are created when the function has started execution and is lost when the function terminates, on the other hand, Global variable is created as execution starts and is lost when the program ends.

 \large{ \blue{ \underline{ \bold{@SweetSparkles}}}}

Similar questions