Size: 447
Comment:
|
Size: 446
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
Line 9: | Line 8: |
* print eval("%s%s%s"%(op,x,y)) | print eval("%s%s%s"%(op,x,y)) |
- Nice, 有不少幽默是第一次看到 -- Hoxide
有一些好像是来源于gnu的官方站[http://www.gnu.org/fun/humor.cn.html#TOCSoftware] --["rockety"]
嘿嘿,Python已经忽悠了很多人来学了,我继续去忽悠人来学Lisp -- AlbertLee
--
- 貢獻一下Python的寫法:
- def foo(op,x,y):
- print eval("%s%s%s"%(op,x,y))
也是兩行就可以下班喔
- 用法: foo("+",66,88)
- Bowen Chiu