摘要:
Problem:Solution:使用lstrip, rstrip, strip方法。>>> x = ' hej '>>> print '|', x.lstrip( ), '|', x.rstrip( ), '|', x.strip( ), '|'| hej | hej | hej |Discussion:也可以指定要去除的元素,而不单单限于空白>>... 阅读全文
posted @ 2010-05-30 10:40
Py&禅
阅读(147)
评论(0)
推荐(0)
浙公网安备 33010602011771号