On Monday 03 December 2007, Tiger12506 wrote: > >> ########################## > >> > >>>>> s = '/home/test/' > >>>>> s1 = s.lstrip('/ehmo') > >>>>> s1 > >> > >> 'test/' > >> ########################## I've been having some problems posting to this list, so this is also a kind of test: I just wrote a global lstring def lstrip(S,chars): if S.startswith(chars): return S[len(chars):] else: return S
It begs for a extension of the string object I guess, but this (and a corollary rstrip) works for me. Tim _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor