Skip to content

Instantly share code, notes, and snippets.

@bee-san
Last active August 2, 2018 20:04
Show Gist options
  • Select an option

  • Save bee-san/51646026b196b7736302da41b87ff035 to your computer and use it in GitHub Desktop.

Select an option

Save bee-san/51646026b196b7736302da41b87ff035 to your computer and use it in GitHub Desktop.
from functools import partial
powers = []
for x in range(2, 1001):
powers.append(partial(power, exponent = x))
print(powers[0](3))
# output is 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment