我有兩個列表,我想創建一個新列表。通過兩個其他列表在python中創建多維列表
例如
a = ["Street zero", "Street one", "Street two"]
b = [0,1,2]
newlist [0][0] = "Street zero"
newlist [1][1] = "Street one"
newlist [2][2] = "Street two"
我怎樣才能做到這一點?
謝謝
我有兩個列表,我想創建一個新列表。通過兩個其他列表在python中創建多維列表
例如
a = ["Street zero", "Street one", "Street two"]
b = [0,1,2]
newlist [0][0] = "Street zero"
newlist [1][1] = "Street one"
newlist [2][2] = "Street two"
我怎樣才能做到這一點?
謝謝
那你的二維陣列中的其它元件(例如newlist [0] [1]) ? – Howard