这是我编写的一些代码:
class MyClass:
listt=[]
def __init__(self):
""
instancelist = [ MyClass() for i in range(29)]
for i in range(0,29):
instancelist[i].listt[i].append("ajay")
print instancelist
我收到此错误:
File "/home/aj/workspace/PythonTutorials/basics/builtFun.py", line 16, in <module>
instancelist[i].listt[i].append("ajaajayy")
IndexError: list index out of range
我该如何解决这个问题?