Using range vs xrange.

This is for python 3 compatibility.