Example 1: how to create 2d list in python o=[] for i in range(0, rows): x=[] for j in range(0, cols): x.append(0) o.append(x) #if you use [[0]*cols]*rows ...
確定! 回上一頁