Open HP1111 opened 6 years ago
xrange is a python built-in function no previous installation needed, check the syntax https://www.pythoncentral.io/how-to-use-pythons-xrange-and-range/
change xrange to range
To embellish comments: xrange is a a python 2 function, which does not exist in python 3 (more precisely, python 2 range went away with python 3, with xrange renamed to range). See bottom of the pythoncentral link provided by xCloudx8. I suspect you also had problems with print which was changed from a "special statement" to a function. You can't "print x" in python 3, rather use "print(x)".
I m new to this, but just copied full code in python 3.6 and got error xrange not defined is there any input file or something needed other than just coping code down and executing?