hbui
2024-07-22 a816d07ebc66c99cde0da4118422d26046502f1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
x = [
    [1.3, 5.6, 7.8],
    [2.4, 1.8, 6.9],
    [3.5, 1.7, 6.3]
]
 
y = [
    [0.2, 3.4, -9.4],
    [1.6, 7.8, 8.4],
    [3.5, 6.8, 7.9]
]
 
s = []
row_size = len(x)
for i in range(0, row_size):
    row = []
    col_size = len(x[i])
    for j in range(0, col_size):
        row.append( x[i][j] + y[i][j] )
    s.append(row)
 
print(s)
 
h = []
col_idx = 1
for i in range(0, row_size):
    row = [ y[i][col_idx] ]
    h.append(row)
 
print(h)