Python论坛  - 讨论区

标题:[python-chinese] 有没有一些一体现python特色的 写得比较巧妙的 小的例子?

2005年12月07日 星期三 13:55

huangyi huangyi12 at gmail.com
Wed Dec 7 13:55:45 HKT 2005

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051207/c327b7d9/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年12月07日 星期三 13:59

林杰杰 linsoso at gmail.com
Wed Dec 7 13:59:38 HKT 2005

有一篇叫《一切从游戏开始》,这个写的不错。

2005/12/7, huangyi <huangyi12 at gmail.com>:
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051207/b6d5eab9/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年12月07日 星期三 14:07

Geoffery>>>嘎瑞>>>XuLi geofferyli at gmail.com
Wed Dec 7 14:07:35 HKT 2005

推荐python cookbook

在05-12-7,林杰杰 <linsoso at gmail.com> 写道:
>
> 有一篇叫《一切从游戏开始》,这个写的不错。
>
> 2005/12/7, huangyi <huangyi12 at gmail.com>:
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> >
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>


--
--------------------------------------------------------------------
我就是我,是人间不一样的焰火.
升级中..................................
http://groups-beta.google.com/group/moview 电影爱好者讨论组
http://groups-beta.google.com/group/wiki4u   wiki爱好者讨论组
-------------------------------------------------------------------
python-chinese list
Python中文技术讨论邮件列表
发言: 发邮件到 python-chinese at lists.python.cn
订阅: 发送 subscribe 到 python-chinese-request at lists.python.cn
退订: 发送 unsubscribe 到  python-chinese-request at lists.python.cn
详细说明: http://python.cn/mailman/listinfo/python-chinese
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051207/fd3893a3/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年12月07日 星期三 14:48

Zoom Quiet zoom.quiet at gmail.com
Wed Dec 7 14:48:17 HKT 2005

在 05-12-7,Geoffery>>>嘎瑞>>>XuLi<geofferyli at gmail.com> 写道:
> 推荐python cookbook
>
> 在05-12-7,林杰杰 <linsoso at gmail.com> 写道:
> > 有一篇叫《一切从游戏开始》,这个写的不错。
http://wiki.woodpecker.org.cn/moin/AllStartFromGame
是俺彻底拜服Python 的经典小文!!!
凡是对快捷开发没有体验的同志们,推荐阅读哪!


> >
> > 2005/12/7, huangyi <huangyi12 at gmail.com>:
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese at lists.python.cn
> > > Subscribe: send subscribe to
> python-chinese-request at lists.python.cn
> > > Unsubscribe: send unsubscribe to
> python-chinese-request at lists.python.cn
> > > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> > >
> > >
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to
> python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to
> python-chinese-request at lists.python.cn
> > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> >
> >
>
>
>
> --
> --------------------------------------------------------------------
> 我就是我,是人间不一样的焰火.
> 升级中..................................
> http://groups-beta.google.com/group/moview 电影爱好者讨论组
> http://groups-beta.google.com/group/wiki4u   wiki爱好者讨论组
> -------------------------------------------------------------------
> python-chinese list
> Python中文技术讨论邮件列表
> 发言: 发邮件到 python-chinese at lists.python.cn
> 订阅: 发送 subscribe 到 python-chinese-request at lists.python.cn
> 退订: 发送 unsubscribe 到
> python-chinese-request at lists.python.cn
> 详细说明: http://python.cn/mailman/listinfo/python-chinese
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to
> python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to
> python-chinese-request at lists.python.cn
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>
>


--
# Time is unimportant, only life important!
## 面朝开源,我心自由!

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年12月07日 星期三 16:57

Li Weigang dimens at gmail.com
Wed Dec 7 16:57:52 HKT 2005

       max_item += ','+i

这句话怎么解释呢?
如果在第一个例子中,把
seq = [ [5,6,7,8,9], [5,6,7,9,8] ]
改成
seq = [ [5,6,7,8,9], [5,6,7,8,9] ]
程序就会出错啦。


On 12/7/05, Zoom Quiet <zoom.quiet at gmail.com> wrote:
>
> 在 05-12-7,Geoffery>>>嘎瑞>>>XuLi<geofferyli at gmail.com> 写道:
> > 推荐python cookbook
> >
> > 在05-12-7,林杰杰 <linsoso at gmail.com> 写道:
> > > 有一篇叫《一切从游戏开始》,这个写的不错。
> http://wiki.woodpecker.org.cn/moin/AllStartFromGame
> 是俺彻底拜服Python 的经典小文!!!
> 凡是对快捷开发没有体验的同志们,推荐阅读哪!
>
>
> > >
> > > 2005/12/7, huangyi <huangyi12 at gmail.com>:
> > > >
> > > > _______________________________________________
> > > > python-chinese
> > > > Post: send python-chinese at lists.python.cn
> > > > Subscribe: send subscribe to
> > python-chinese-request at lists.python.cn
> > > > Unsubscribe: send unsubscribe to
> > python-chinese-request at lists.python.cn
> > > > Detail Info:
> > http://python.cn/mailman/listinfo/python-chinese
> > > >
> > > >
> > >
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese at lists.python.cn
> > > Subscribe: send subscribe to
> > python-chinese-request at lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > python-chinese-request at lists.python.cn
> > > Detail Info:
> > http://python.cn/mailman/listinfo/python-chinese
> > >
> > >
> >
> >
> >
> > --
> > --------------------------------------------------------------------
> > 我就是我,是人间不一样的焰火.
> > 升级中..................................
> > http://groups-beta.google.com/group/moview 电影爱好者讨论组
> > http://groups-beta.google.com/group/wiki4u   wiki爱好者讨论组
> > -------------------------------------------------------------------
> > python-chinese list
> > Python中文技术讨论邮件列表
> > 发言: 发邮件到 python-chinese at lists.python.cn
> > 订阅: 发送 subscribe 到 python-chinese-request at lists.python.cn
> > 退订: 发送 unsubscribe 到
> > python-chinese-request at lists.python.cn
> > 详细说明: http://python.cn/mailman/listinfo/python-chinese
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to
> > python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request at lists.python.cn
> > Detail Info:
> > http://python.cn/mailman/listinfo/python-chinese
> >
> >
>
>
> --
> # Time is unimportant, only life important!
> ## 面朝开源,我心自由!
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>


--

Best Wishes
Dimension LEE
dimens at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051207/bac19877/attachment-0001.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年12月07日 星期三 17:08

Fat fatbobman at gmail.com
Wed Dec 7 17:08:25 HKT 2005

原来程序的问题 :
# calc.py
def calc(seq):
   maximum = 0
   max_item = []
   for i in seq:
     product = (i[0]*100 + i[1]*10 + i[2]) * (i[3]*10 + i[4])
     if product > maximum:
        maximum = product
        max_item = str(i)  # change
     elif product == maximum:
        max_item += ','+str(i)  #change
   print max_item,maximum
   return max_item, maximum

seq = [ [5,6,7,8,9], [5,6,7,8,9] ]
max_item, maximum = calc(seq)
print "Maximum at", max_item, ",product", maximum
--
我的blog: http://www.donews.net/fatbobman

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号