#!/usr/bin/env python # # total.py # # Copyright 2017 Todd Shadburn # # Licensed under the GNU GPL version 2 # import sys total = 0.0 for ln in sys.stdin: s = ln.strip(' \r\n') if len(s): try: total += float(s) except: pass print total sys.exit(0)