Skip to content

Instantly share code, notes, and snippets.

@chadgh
Created October 22, 2014 14:19
Show Gist options
  • Save chadgh/a0d1cb83f1edfb1c777b to your computer and use it in GitHub Desktop.
Save chadgh/a0d1cb83f1edfb1c777b to your computer and use it in GitHub Desktop.
​def make_power(power):
def pow(number):
return number ** power
return pow
cube = make_power(3)
print(cube(3)) # should print '27'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment