Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sum of Pairs: Python solution by Dawie Strauss

  • Loading branch information...
commit 005aa4482f58bbb24be9ebb8e5b24d34b80a8e8a 1 parent 136a21b
@apauley authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Snippets/SumPairs/sumpairs-sumzip.py
View
4 Snippets/SumPairs/sumpairs-sumzip.py
@@ -0,0 +1,4 @@
+# Solution by Dawie Strauss
+
+a = [1, 2, 3, 4, 5]
+[sum(i) for i in zip(a,a[1:])]
Please sign in to comment.
Something went wrong with that request. Please try again.