跳到主要內容

[Python] 建立空的鏈結 Create empty list


以下介紹兩個方法來建立空的鏈結

方法一

lst = [None] * 10

方法二

lst = [None for i in range(10)]



留言