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 maillist - [email protected] > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
