Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created June 1, 2018 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acwoss/9a1ac8ef523931113a2c8456486f5cd2 to your computer and use it in GitHub Desktop.
Save acwoss/9a1ac8ef523931113a2c8456486f5cd2 to your computer and use it in GitHub Desktop.
WordyDaringConnections created by acwoss - https://repl.it/@acwoss/WordyDaringConnections
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