ls = [None] * 5
或: ls = [] for i in range(5): ls.insert(i,None)
输出:[None, None, None, None, None]
本文标题:Python新建指定大小数组
本文链接:https://www.haomeiwen.com/subject/xuawoctx.html
网友评论