Traceback (most recent call last):
File "cptj.py", line 50, in <module>
wordlist=readfile()
File "cptj.py", line 33, in readfile
if tag in wordlist[k]: #用符号分割
IndexError: list index out of range
...全文
3084打赏收藏
求教Python的list index out of range错误
网上看到的词频统计代码 我运行上统计大的文件就报这个错误,小白求教怎么解决 Traceback (most recent call last): File "cptj.py", line 50, in wordlist=readfile() File "cptj.py", line 33, in readfile if tag in wordlist[k]: #用符号分割 IndexError: list index out of range