string(index out of range)
1、错误应该是列表超出范围,比如
2、S=' helloworld ' #的长度是11
3、打印[0]
4、h
5、版画[10]
6、d
7、印刷品[100]
8、错误: stringindexoutofrange前两个会正常返回结果,最后一个会报告错误超出范围。
1、错误应该是列表超出范围,比如
2、S=' helloworld ' #的长度是11
3、打印[0]
4、h
5、版画[10]
6、d
7、印刷品[100]
8、错误: stringindexoutofrange前两个会正常返回结果,最后一个会报告错误超出范围。