I am trying to write a script in Python which "cleans" a number of file-fed text like this:
for i in range(1,10):
number = 1
cleanText = re.sub('number.','',line).strip()
number = number + 1
print cleanText
An example file would be: 1. Hello, World 2. Hello earth
What I need to do here is remove the numbering and the dots along with leading blank spaces in one fell swoop. But how on earth can I first perform a simple variable expansion?
Thank you all in advance.