2、list转array 获取array形状 array属于numpy库 import numpy as np L = [[1,2],[3,4],[5,6],[7,8]] L = np.array(L) print(L.shape) 参考链接 array的shape属性 print(L.shape) # 展示行数,列数 (4, 3) >>> print(y.shape[0]) # 展示行数 4 >>> print(y.shape[1]) # 展示列数 3 3、array 水平 拼接 有两个数组a和b