Created
June 1, 2018 17:16
-
-
Save acwoss/9a1ac8ef523931113a2c8456486f5cd2 to your computer and use it in GitHub Desktop.
WordyDaringConnections created by acwoss - https://repl.it/@acwoss/WordyDaringConnections
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
def matrix_union(A, B): | |
for a, b in zip(A, B): | |
yield [*a, *b] | |
A = [ | |
[0, 0, 1], | |
[0, 1, 0], | |
[1, 0, 1] | |
] | |
B = [ | |
[2, 2, 3], | |
[3, 2, 2], | |
[3, 3, 3] | |
] | |
print(list(matrix_union(A, B))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment