I am struggling to combine the values of two arrays in Python. I want to get the values of two arrays as pairs.
EXAMPLE: Suppose we have two arrays a
and b
as below:
a = [[1, 2, 3], [4, 5, 6], [0, 3, 1]]
for i in range(len(a)):
for j in range(len(a[i])):
print(a[i][j], end=' ')
print()
b = [[4, 0, 3], [6, 3, 6], [1, 4, 1]]
for i in range(len(b)):
for j in range(len(b[i])):
print(b[i][j], end=' ')
print()
How can I combine the values of two arrays as pairs similar to:
array([[(1,4), (2,0), (3,3)],
[(4,6), (5,3), (6,6)],
[(0,1), (3,4), (1,1)]])
I am not sure if it can be done as an array or a list.