2004-10-06
stupid python tricks. what does this one-liner do?
python -c 'import sys;print (lambda f,n:f(f,n))(lambda g,n:[lambda:1,lambda:g(g,n-1)+g(g,n-2)][bool(n>1)](),int(sys.argv[1]));' 42
|
python -c 'import sys;print (lambda f,n:f(f,n))(lambda g,n:[lambda:1,lambda:g(g,n-1)+g(g,n-2)][bool(n>1)](),int(sys.argv[1]));' 42
|
Comments:
Post a Comment