diff options
Diffstat (limited to 'challenge-113/abigail/python/ch-2.py')
| -rw-r--r-- | challenge-113/abigail/python/ch-2.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-113/abigail/python/ch-2.py b/challenge-113/abigail/python/ch-2.py new file mode 100644 index 0000000000..73b6b9bc8b --- /dev/null +++ b/challenge-113/abigail/python/ch-2.py @@ -0,0 +1,16 @@ +#!/opt/local/bin/python + +# +# See ../README.md +# + +# +# Run as: python ch-2.py < input-file +# + +import fileinput + +for line in fileinput . input (): + numbers = list (map (lambda _: int (_), line . split ())) + total = sum (numbers) + print (' ' . join (map (lambda _: str (total - _), numbers))) |
