Python论坛  - 讨论区

标题:[python-chinese] (无主题)

2007年07月05日 星期四 11:45

Neo Chen openunix在163.com
星期四 七月 5 11:45:12 HKT 2007

a = '111,333'

tuple(a.split(','))

µÃµ½.

('111', '333')

µ«ÎÒÏëÒªintµÄ.
(111, 333)

Homepage: http://www.netkiller.org.cn
Python + Django http://album.bg7nyt.cn
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070705/5594e07a/attachment.htm 
-------------- 下一部分 --------------
Ò»¸ö·ÇÎı¾¸½¼þ±»Çå³ý...
·¢ÐÅÈË: %(who)s
Ö÷Ìâ: %(subject)s
ÈÕÆÚ: %(date)s
´óС: 1325
Url: http://python.cn/pipermail/python-chinese/attachments/20070705/5594e07a/attachment-0001.bin 

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

2007年07月05日 星期四 11:49

lai yonghao lanphaday在gmail.com
星期四 七月 5 11:49:50 HKT 2007

 a = '111,333'
tuple(map(int, a.split(',')))


ÔÚ07-7-5£¬Neo Chen <openunix在163.com> дµÀ£º
>
>  a = '111,333'
> tuple(a.split(','))
>
> µÃµ½.
>
> ('111', '333')
>
> µ«ÎÒÏëÒªintµÄ.
> (111, 333)
>
> Homepage: http://www.netkiller.org.cn
> Python + Django http://album.bg7nyt.cn
>
> _______________________________________________
> 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/20070705/d2c68ab7/attachment.htm 

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

2007年07月05日 星期四 11:55

Wei Jiang jiejisheng在gmail.com
星期四 七月 5 11:55:14 HKT 2007

tuple( [int(n) for n in a.split(',')])

On 7/5/07, Neo Chen <openunix在163.com> wrote:
>
>
> a = '111,333'
>
> tuple(a.split(','))
>
> 得到.
>
> ('111', '333')
>
> 但我想要int的.
> (111, 333)
>
> Homepage: http://www.netkiller.org.cn
> Python + Django http://album.bg7nyt.cn
> _______________________________________________
> 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
>
>

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

2007年07月05日 星期四 11:55

Neo Chen openunix在163.com
星期四 七月 5 11:55:26 HKT 2007

·Ç³£¸Ðл.
  ----- Original Message ----- 
  From: lai yonghao 
  To: python-chinese在lists.python.cn 
  Sent: Thursday, July 05, 2007 11:49 AM
  Subject: Re: [python-chinese] (ÎÞÖ÷Ìâ)


  a = '111,333'

  tuple(map(int, a.split(',')))



  ÔÚ07-7-5£¬Neo Chen <openunix在163.com> дµÀ£º 
    a = '111,333'

    tuple(a.split(','))

    µÃµ½.

    ('111', '333')

    µ«ÎÒÏëÒªintµÄ.
    (111, 333)

    Homepage: http://www.netkiller.org.cn
    Python + Django http://album.bg7nyt.cn

    _______________________________________________
    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/20070705/e0e13c1f/attachment.html 

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

2007年07月05日 星期四 12:46

Ben Luo benluo在gmail.com
星期四 七月 5 12:46:12 HKT 2007

http://www.builderau.com.au/program/python/soa/Data_driven_transformations_list_comprehensions/0,2000064084,339279491,00.htm
½²½âÁËÕâÁ½ÖÖÓ÷¨.

On 7/5/07, Neo Chen <openunix在163.com> wrote:
>
>  ·Ç³£¸Ðл.
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070705/3d8c5870/attachment.html 

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

2007年07月05日 星期四 13:01

lai yonghao lanphaday在gmail.com
星期四 七月 5 13:01:29 HKT 2007

ÌâÍâ»°£º
tuple( [int(n) for n in a.split(',')])
ÀïµÄÁ½¸ö[]²»ÊDZØÒªµÄ£¬Èç¹ûÈ¥µô£¬¿ÉÒԵóöÒ»ÑùµÄ½á¹û£¨Py 2.4»òÒÔÉÏÖ§³Ö£©¡£
Õâ¿ÉÒÔÓÅ»¯ÐÔÄÜ£¬ÒòΪÎÞÐèÉú³ÉÒ»¸öÕæÕýµÄlist¡£
Èç¹ûÄã¾õµÃ¿É¶ÁÐÔÓÐËùϽµ»òÕß²»·ûºÏÄãµÄÏ°¹ß£¬¿ÉÒÔʹÓãº
( int(n) for n in a.split(','))
·½°¸£¬Py 2.5Ö§³Ö£¬µ«×¢ÒâÁË£¬ÕâÖ»ÊÇÒ»¸öÉú³ÉÆ÷¡£


2007/7/5, Wei Jiang <jiejisheng在gmail.com>:
>
> tuple( [int(n) for n in a.split(',')])
>
> On 7/5/07, Neo Chen <openunix在163.com> wrote:
> >
> >
> > a = '111,333'
> >
> > tuple(a.split(','))
> >
> > µÃµ½.
> >
> > ('111', '333')
> >
> > µ«ÎÒÏëÒªintµÄ.
> > (111, 333)
> >
> > Homepage: http://www.netkiller.org.cn
> > Python + Django http://album.bg7nyt.cn
> > _______________________________________________
> > 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/20070705/a1bb0ae4/attachment.html 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号