What is the difference between ‘xrange’ and ‘range’ in Python?
Hello Tim-khorev,
xrange()
and range()
are quite similar in terms of functionality. They both generate a sequence of integers, with the only difference being that range() returns a Python list, whereas xrange()
returns an xrange object.