list assignment index out of range

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了list assignment index out of range相关的知识,希望对你有一定的参考价值。

?????????ror   sig   lis   ??????   font   ??????   out   indexer   ??????   

??????

m1=[]
for i in xrange(n):
m1[i]=1

?????????IndexError: list assignment index out of range

??????

?????????????????????????????????

????????????1

m1.append(1???

????????????2

????????????????????????list???

m1=[0]*len(data)

m1[1]=1

 



以上是关于list assignment index out of range的主要内容,如果未能解决你的问题,请参考以下文章

Python常见错误:IndexError: list index out of range

xadmin:list index out of range

查看Kafka集群下所有的topic报错“Timed out waiting for a node assignment. Call: listTopics“

IndexError: list index out of range list超出了?要怎么改?

list index out of bounds

关于python list index out of range