Python3 常出现的错误
1、'dict' object has no attribute 'iteritems' 原因:Python3.5中:iteritems变为items(python2和python3格式区别);
2、类中出错takes no arguments 原因:def __init__(self, , ): init 前后应是双下滑线而不是但下滑线
3、list index out of range 原因:第1种可能情况:list[index]index超出范围,也就是常说的数组越界。第2种可能情况:list是一个空的, 没有一个元素,进行list[0]就会出现该错误,这在爬虫问题中很常见,比如有个列表爬去下来为空,统一处理就会报错。