Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def BinPow(a, n, fun):
- if n == 1:
- return fun(a)
- else:
- def BinPow1(a1, n1, fun1=fun):
- if n == 1:
- return fun1(a)
- else:
- return BinPow1(fun1(a1), n1 - 1)
- return(BinPow1(fun1(a1), n - 1))
- print(BinPow("Se", 7, str.__add__))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement