Size: 593
Comment:
|
← Revision 12 as of 2009-12-25 07:09:35 ⇥
Size: 593
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
* 有一些好像是来源于gnu的官方站http://www.gnu.org/fun/humor.cn.html#TOCSoftware --["rockety"] | * 有一些好像是来源于gnu的官方站http://www.gnu.org/fun/humor.cn.html#TOCSoftware --[[rockety]] |
- 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
--
- 上面的代码有问题哦,运算的结果是'6688',:-)
应该这么写:
- def foo(op, x, y):
- print eval("%d%s%d" % (x, op, y))