问题 list 遍历时报错:IndexError: list index out of range 分析 可能是: list 下标 index 超出范围list 为空 解决 try: ... except IndexError: return 或者 pass