2007年05月23日 星期三 09:36
eg: ÎÒÏëÒª¶¯Ì¬ÉùÃ÷N(N>0)¸ö±äÁ¿(pos1,pos2,pos3....)£¬¶øÇÒ±äÁ¿µÄÖµÒ²ÊÇËæN±ä»¯µÄ,¿ÉÒÔÂð£¿ÔõÑù×ö£¿Ö¸µãÒ»¶þ£¬¶àл! -- ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/d6a080ff/attachment.html
2007年05月23日 星期三 09:39
你要那么多变量干嘛。。。都放到一个list里去不就好了 On 5/23/07, xiaoyi tian <purpen.w at gmail.com> wrote: > eg: > 我想要动态声明N(N>0)个变量(pos1,pos2,pos3....),而且变量的值也是随N变化的,可以吗?怎样做?指点一二,多谢! > > -- > 人生就像一个瓶子,而生活就是瓶子里的水。 > _______________________________________________ > 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 > -- Any complex technology which doesn't come with documentation must be the best available.
2007年05月23日 星期三 09:43
ÔÚforÀﶨÒåµÄ±äÁ¿ÊDz»ÊÇfor½á¹¹ÀïµÄ±äÁ¿ÄØ£¿ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/7d1622e0/attachment.htm
2007年05月23日 星期三 09:47
ÎÒÏëªÔÊÇµÄ°É 2007/5/23, jessinio smith <jessinio在gmail.com>: > > ÔÚforÀﶨÒåµÄ±äÁ¿ÊDz»ÊÇfor½á¹¹ÀïµÄ±äÁ¿ÄØ£¿ > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/4f7e5403/attachment.htm
2007年05月23日 星期三 09:47
µ«ÊÇÎÒ²»È·¶¨±äÁ¿µÄ¸öÊý£¬ÔõÑù·Åµ½Ò»¸öÁбíÄØ£¿ ÔÚ07-5-23£¬xxmplus <xxmplus在gmail.com> дµÀ£º > > ÄãÒªÄÇô¶à±äÁ¿¸ÉÂï¡£¡£¡£¶¼·Åµ½Ò»¸ölistÀïÈ¥²»¾ÍºÃÁË > > On 5/23/07, xiaoyi tian <purpen.w在gmail.com> wrote: > > eg: > > ÎÒÏëÒª¶¯Ì¬ÉùÃ÷N(N>0)¸ö±äÁ¿(pos1,pos2,pos3....)£¬¶øÇÒ±äÁ¿µÄÖµÒ²ÊÇËæN±ä»¯µÄ,¿ÉÒÔÂð£¿ÔõÑù×ö£¿Ö¸µãÒ»¶þ£¬¶àл! > > > > -- > > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > -- > Any complex technology which doesn't come with documentation must be the > best > available. > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/dd5fc584/attachment.html
2007年05月23日 星期三 09:49
²»ÊÇ£¬ÎÒÏëÒªfor½á¹¹ÒÔÍâµÄÒ²ÄÜʹÓà ÔÚ07-5-23£¬jessinio smith <jessinio在gmail.com> дµÀ£º > > ÔÚforÀﶨÒåµÄ±äÁ¿ÊDz»ÊÇfor½á¹¹ÀïµÄ±äÁ¿ÄØ£¿ > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/1f4d8a13/attachment.htm
2007年05月23日 星期三 10:59
> > 但是我不确定变量的个数,怎样放到一个列表呢? 列表是不定长的。 > 在for里定义的变量是不是for结构里的变量呢? 可以在外面访问。 -- http://codeplayer.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/14e8ed46/attachment.html
2007年05月23日 星期三 11:37
àÞ£¬¶àлÁË¡£ ÔÚ07-5-23£¬»ÆÒã <yi.codeplayer在gmail.com> дµÀ£º > > µ«ÊÇÎÒ²»È·¶¨±äÁ¿µÄ¸öÊý£¬ÔõÑù·Åµ½Ò»¸öÁбíÄØ£¿ > > > ÁбíÊDz»¶¨³¤µÄ¡£ > > > > ÔÚforÀﶨÒåµÄ±äÁ¿ÊDz»ÊÇfor½á¹¹ÀïµÄ±äÁ¿ÄØ£¿ > > > ¿ÉÒÔÔÚÍâÃæ·ÃÎÊ¡£ > > -- > http://codeplayer.blogspot.com/ > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/0f101b44/attachment.htm
2007年05月23日 星期三 12:00
¿ÉÒÔÓÃa = n*[0]»òa=n*[None]¿´¿´ ±ÈÈç def foo(n, value=None): return n*[value] ÔÚ07-5-23£¬xiaoyi tian <purpen.w在gmail.com> дµÀ£º > > àÞ£¬¶àлÁË¡£ > > ÔÚ07-5-23£¬»ÆÒã <yi.codeplayer在gmail.com> дµÀ£º > > > > µ«ÊÇÎÒ²»È·¶¨±äÁ¿µÄ¸öÊý£¬ÔõÑù·Åµ½Ò»¸öÁбíÄØ£¿ > > > > > > ÁбíÊDz»¶¨³¤µÄ¡£ > > > > > > > ÔÚforÀﶨÒåµÄ±äÁ¿ÊDz»ÊÇfor½á¹¹ÀïµÄ±äÁ¿ÄØ£¿ > > > > > > ¿ÉÒÔÔÚÍâÃæ·ÃÎÊ¡£ > > > > -- > > http://codeplayer.blogspot.com/ > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070523/aac7398c/attachment.html
Zeuux © 2025
京ICP备05028076号