> Suppose i have a string '347 liverpool street'. > I want to remove all the numbers coming at the starting of the > string. > I can think of a few ways but whats the cleanest way to do it?
If you know they are always a contiguous string themn a simple split() call will do it: s = ' '.join(s.split()[1:]) If the numbes may form a more complex pattern then a regex would be better. Use the regex to find the end index and use a slice around the index. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor