2006年10月09日 星期一 23:26
请看以下一个用python写的小程序,能看出它的目的是干嘛吗?
for n in range(12):
    exec("abcdefghijkl"[n]+"=lambda x=0,y=0: "+filter(
        lambda x:x not in "\n$\r","""(x*y#x/x!range(x,
y#x+y!b(1,1#d(e~,e~#d(f~,f~#c(e~,e~+d(g~,d(g~,g~))#"%4
d" % a(x,y#map(lambda y:i(x,y),h~#" ".join(j(x)#"\\n".
join(map(k,h~))""".replace("~","()").replace("#",")!")
        ).split("!")[n])
print l()
晕菜吧?让我们来运行一下:
jliut@~/python/my# python Test.py
   1    2    3    4    5    6    7    8    9   10   11   12
   2    4    6    8   10   12   14   16   18   20   22   24
   3    6    9   12   15   18   21   24   27   30   33   36
   4    8   12   16   20   24   28   32   36   40   44   48
   5   10   15   20   25   30   35   40   45   50   55   60
   6   12   18   24   30   36   42   48   54   60   66   72
   7   14   21   28   35   42   49   56   63   70   77   84
   8   16   24   32   40   48   56   64   72   80   88   96
   9   18   27   36   45   54   63   72   81   90   99  108
  10   20   30   40   50   60   70   80   90  100  110  120
  11   22   33   44   55   66   77   88   99  110  121  132
  12   24   36   48   60   72   84   96  108  120  132  144
jliut@~/python/my#
花王!
-- 
Just do it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20061009/5bdb34bd/attachment.htm 
2006年10月09日 星期一 23:28
附原文的链接。 http://p-nand-q.com/python/obfuscated_python.html On 10/9/06, Jun Liu <liujun.gz at gmail.com> wrote: > > 请看以下一个用python写的小程序,能看出它的目的是干嘛吗? > for n in range(12): > exec("abcdefghijkl"[n]+"=lambda x=0,y=0: "+filter( > lambda x:x not in "\n$\r","""(x*y#x/x!range(x, > y#x+y!b(1,1#d(e~,e~#d(f~,f~#c(e~,e~+d(g~,d(g~,g~))#"%4 > d" % a(x,y#map(lambda y:i(x,y),h~#" ".join(j(x)#"\\n". > join(map(k,h~))""".replace("~","()").replace("#",")!") > ).split("!")[n]) > print l() > > 晕菜吧?让我们来运行一下: > > jliut@~/python/my# python Test.py > 1 2 3 4 5 6 7 8 9 10 11 12 > 2 4 6 8 10 12 14 16 18 20 22 24 > 3 6 9 12 15 18 21 24 27 30 33 36 > 4 8 12 16 20 24 28 32 36 40 44 48 > 5 10 15 20 25 30 35 40 45 50 55 60 > 6 12 18 24 30 36 42 48 54 60 66 72 > 7 14 21 28 35 42 49 56 63 70 77 84 > 8 16 24 32 40 48 56 64 72 80 88 96 > 9 18 27 36 45 54 63 72 81 90 99 108 > 10 20 30 40 50 60 70 80 90 100 110 120 > 11 22 33 44 55 66 77 88 99 110 121 132 > 12 24 36 48 60 72 84 96 108 120 132 144 > jliut@~/python/my# > > 花王! > > -- > Just do it! -- Just do it! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20061009/96bf406f/attachment-0001.html
2006年10月10日 星期二 07:22
再NB的语言和工具都可以做出违反人品的事情,偶佩服。
Zeuux © 2025
京ICP备05028076号