xrange function in python code example Example: python xrange Python 2.x: xrange() Python 3.x: range()