create a 2d array in python ; 1. def build_matrix(rows, cols): ; 2. matrix = [] ; 3. ; 4. for r in range(0, rows): ; 5. matrix.append([0 for c in range(0, cols)]).
確定! 回上一頁