Tyl*_*ler 20 python list indexoutofboundsexception
我告诉我的程序打印输出的第53行.这个错误告诉我没有那么多行,因此无法打印出来吗?
kjf*_*tch 25
是,
您正在尝试访问不存在的列表元素.
MyList = ["item1", "item2"]
print MyList[0] # Will work
print MyList[1] # Will Work
print MyList[2] # Will crash.
Run Code Online (Sandbox Code Playgroud)
你有一个一个一个错误吗?
| 归档时间: |
|
| 查看次数: |
309896 次 |
| 最近记录: |