Re:One-lined Python
by olooney on Thursday August 22, 2019 @10:56AM
(#20768772)
I like this. Here is a one-liner I wrote recently that calculates the 10th Fibonacci number:
Paste that into a Python 3 interpreter, you should see "55". Somewhere in there is the Y-contaminator and several other tricks similar to what this article describes.
[ Parent
| on HN ]
If you like that sort of thing, try doing similar code for the Ackermann function [1]. In a certain sense that can be made semi-formal, if you can do this sort of thing for the Ackermann function, then you can do it for almost anything.