Why does this one-liner produce the Fibonacci sequence?
print(*map((lambda n,f=lambda f,n:f(n-1)+f(n-2)if n>1else 1:f((lambda g=[]:(g.append(lambda n,f=f:f(g[0],n)),g))()[1][0],n)),range(10)))
What about this two-liner?
def f(n,l=[]):sum(f(n-1)if n>len(l)else());yield from l[:n]if n<len(l)else(l.append(sum(l[~1:])if n>1else 1),l[:n])[1]
print(*f(5))
Which is better? What limits do they both share? Which is more limited and by what?
there doesn't seem to be anything here