2
我想傳遞一個矩陣的功能(作爲參數),但出現了一個錯誤說傳遞矩陣函數在python
TypeError: list indices must be integers, not tuple
這裏是我的代碼
def question_1_b(arr):
for i in range(4):
for j in range(4):
block[4*i+j] = arr[i,j]
return block
question_1_b([[70,52,13,67],[90,48,57,26],[43,45,67,89],[88,65,44,23]])