hdarwin

cstutoringcenter.com_Filtering Strings

Jan 2nd, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. Filteriimport re
  2. l = list()
  3. for s in open("p97.txt", "r"):
  4.     match = re.findall("\d+", s)
  5.     sum = 0
  6.     for x in match:
  7.         sum += int(x)
  8.     l.append(sum)
  9. print max(l)
  10. ng Strings
Advertisement
Add Comment
Please, Sign In to add comment