Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- def sumOfItems(file):
- result = 0
- lines = file.readlines()
- for line in lines:
- result = result + sum(map(
- lambda x: int(x),
- filter(lambda x: x.isdigit(), line.rstrip().split(","))
- ))
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement