list 是用中括號括起來的一組資料,有 index 沒有 key。可以在 iteration 的時候使用 remove 移除其中元素。 dict 是用大括號括起來的一組資料,也可以用 dict()來生成,要給 key ,也會有 index,不可以在 iteration 的時候把元素移除。若要移除元素,只能用 del 這個statement。 ...
請先 登入 以發表留言。