Re: Processing and adding numbers from lines.

2006-01-05 Thread bearophileHUGS
With your input this returns: [200, 20, 0, 13050] so it's not what you want, but maybe it can be a starting point for you: from re import findall txt = """\ test test test description (100-10-0, 6700 test) test test test description (100-10-0, 6350 test)""" lines = txt.split("\n") re

Processing and adding numbers from lines.

2006-01-04 Thread sanfranc415
Hello, Group: Is there an easy way to automate the processing of adding the following numbers in two lines? test test test description (100-10-0, 6700 test) test test test description (100-10-0, 6350 test) I'd like to be able run a script on the file above to produce the following