Method 2: NumPy. import numpy as np. a = np.array(data). res = np.sum(a, axis=1). print(res). # [ 6 15 24].
確定! 回上一頁