from functools import reduce def fib(n): assert n >= 0 return reduce(lambda a, _: (a[1], a[0]+a[1]), range(n), (0, 1))[1] print(fib(100))
Standard input is empty
573147844013817084101
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!