Created
October 17, 2022 01:14
-
-
Save galenseilis/3de78682f1627263ce0c4416195403ac to your computer and use it in GitHub Desktop.
Naive implementation of a 'power tower'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def exp_seq(iterable): | |
| '''Calculates the exponent tower of a sequence of numbers.''' | |
| a = iterable[0] | |
| for i in iterable[1:]: | |
| a = a**i | |
| return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment