Re: [Tutor] how to remove first '/'

2009-08-26 Thread Brett Wilkins
I would say the best way would be to use lstrip... path='/path/to/file' stripped_path = path.lstrip('/') Cheers --Brett > Hello, > I want to strip the first '/' from the following: > > '/path/to/file' > > How can I do this? > > Dave > ___ > Tutor mailli

Re: [Tutor] how to remove first '/'

2009-08-25 Thread davidwilson
Thank you for the replies. Original Message From: Emad Nawfal (عماد نوفل) To: davidwil...@safe-mail.net Cc: tutor@python.org Subject: Re: [Tutor] how to remove first '/' Date: Tue, 25 Aug 2009 18:01:26 -0400 > > > On Tue, Aug 25, 2009 at 5:55 PM, wr

Re: [Tutor] how to remove first '/'

2009-08-25 Thread عماد نوفل
On Tue, Aug 25, 2009 at 5:55 PM, wrote: > Hello, > I want to strip the first '/' from the following: > > '/path/to/file' > > How can I do this? > > Dave > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > If I

Re: [Tutor] how to remove first '/'

2009-08-25 Thread vince spicer
On Tue, Aug 25, 2009 at 3:55 PM, wrote: > Hello, > I want to strip the first '/' from the following: > > '/path/to/file' > > How can I do this? > > Dave > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > there

[Tutor] how to remove first '/'

2009-08-25 Thread davidwilson
Hello, I want to strip the first '/' from the following: '/path/to/file' How can I do this? Dave ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor