Re: [Tutor] strip function

2008-12-24 Thread Kent Johnson
On Wed, Dec 24, 2008 at 7:25 AM, Norman Khine wrote: > > Hello, > I have difficulties in trying to stripping the following: > item_path = '/companies/company/news' item_strip = item_path.strip('/companies') item_strip > 'y/new' strip() doesn't do what you want. It removes any of th

Re: [Tutor] strip function

2008-12-24 Thread bob gailer
Norman Khine wrote: Hello, I have difficulties in trying to stripping the following: >>> item_path = '/companies/company/news' >>> item_strip = item_path.strip('/companies') >>> item_strip 'y/new' >>> I would like to return: >>> item_strip '/company/news'

[Tutor] strip function

2008-12-24 Thread Norman Khine
Hello, I have difficulties in trying to stripping the following: >>> item_path = '/companies/company/news' >>> item_strip = item_path.strip('/companies') >>> item_strip 'y/new' >>> I would like to return: >>> item_strip '/company/news' What is the best way to do this. Thanks ___