xrange -> range

To support both python 2.x and 3.x we need to use range instead of xrange.