@@ -735,7 +735,7 @@ Is it possible to write obfuscated one-liners in Python?
735
735
--------------------------------------------------------
736
736
737
737
Yes. Usually this is done by nesting :keyword: `lambda ` within
738
- :keyword: `!lambda `. See the following three examples, due to Ulf Bartelt::
738
+ :keyword: `!lambda `. See the following three examples, slightly adapted from Ulf Bartelt::
739
739
740
740
from functools import reduce
741
741
@@ -748,7 +748,7 @@ Yes. Usually this is done by nesting :keyword:`lambda` within
748
748
f(x,f), range(10))))
749
749
750
750
# Mandelbrot set
751
- print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,
751
+ print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+'\n'+ y,map(lambda y,
752
752
Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,
753
753
Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,
754
754
i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y
0 commit comments