python 报错 NameError: name 'xrange' is not defined 代码: for i in xrange(len(colors)): # python3.X 报错 pass 原因: python3.X,range()与xrange()合并为range()