Python论坛  - 讨论区

标题:Re: [python-chinese] 再问一个关于字符串处理的问题

2005年02月01日 星期二 16:12

Frank gavin at sz.net.cn
Tue Feb 1 16:12:45 HKT 2005

chr(i)*i
如:
>>> chr(45)*45
'---------------------------------------------'


----- Original Message ----- 
From: "haiwen xiao" <overtime at 126.com>
To: <python-chinese at lists.python.cn>
Sent: Tuesday, February 01, 2005 4:00 PM
Subject: [python-chinese] 再问一个关于字符串处理的问题


Python-chinese:

   我想根据一整数,生成一为单一字符的字符串,如字符为“-”,整数为10,想生成"----------"这样的字符串,有没有什么简单的方法?

 谢谢!
 

        haiwen xiao
        overtime at 126.com
          2005-02-01



_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese

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

2005年02月01日 星期二 16:23

haiwen xiao overtime at 126.com
Tue Feb 1 16:23:15 HKT 2005

Frank,您好!

	非常感谢! 还有superisaac。

======= 2005-02-01 16:12:00 您在来信中写道:=======

>chr(i)*i
>如:
>>>> chr(45)*45
>'---------------------------------------------'
>
>
>----- Original Message ----- 
>From: "haiwen xiao" <overtime at 126.com>
>To: <python-chinese at lists.python.cn>
>Sent: Tuesday, February 01, 2005 4:00 PM
>Subject: [python-chinese] 再问一个关于字符串处理的问题
>
>
>Python-chinese:
>
>   我想根据一整数,生成一为单一字符的字符串,如字符为“-”,整数为10,想生成"----------"这样的字符串,有没有什么简单的方法?
>
> 谢谢!
> 
>
>        haiwen xiao
>        overtime at 126.com
>          2005-02-01
>
>
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        haiwen xiao
        overtime at 126.com
          2005-02-01






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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号