我想用python代碼創建一個自填充矩陣(Dictionary?Index?我不知道它叫做什麼)。用循環創建一個矩陣Python
這裏有兩種方法我試過
currentstair = [i for i in range(FLOOR - 2)]
for i in STAIRCASE:
staircasenetwork.append([currentstair])
for j in range (STAIRCASE):
for i in range (FLOOR - 2):
staircasenetwork.append([j]i)
我想要列表開始爲[],並最終爲[1,2,3] [1,2,3]]