Dinesh Beniwal
What are local variables and global variables in Python?
By Dinesh Beniwal in Python on Jun 17 2019
  • Bidyasagar Mishra
    Jul, 2019 11

    variable declare inside function known as local variable and outside the function is known as global variable

    • 1
  • Dipa Mehta
    Jun, 2019 17

    A variable declared inside the function's body or in the local scope is known as local variable. Nonlocal variable are used in nested function whose local scope is not defined. This means, the variable can be neither in the local nor the global scope.

    • 1
  • Dhanraj M
    Jul, 2019 24

    Global variables are the one that are defined and declared outside a function and we need to use them inside a function.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS