Skip to content

Instantly share code, notes, and snippets.

@Abhishek-Srivastava
Created May 25, 2013 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abhishek-Srivastava/5648375 to your computer and use it in GitHub Desktop.
Save Abhishek-Srivastava/5648375 to your computer and use it in GitHub Desktop.
def double(x):
global x
x = x*2
return
double(x)
#Instead this could be done
def double(n):
n = n * 2
return n
x = double(x)
# Or
function doubleX():
global x
x = x * 2
return
doubleX()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment