Created
November 20, 2018 19:37
-
-
Save colbymorrison/06d232006c858be02f0d03d0b75fb035 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mylists = ([1, 2, 3], [4, 5, 6], [7, 8, 9]) | |
out = [sum(x) for x in zip(*mylists)] | |
print(out) # Prints [12, 15, 18] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment