use range instead of xrange for Python3 compatibility.
Merge pull request #3 from amueller/no_xrange

use range instead of xrange for Python3 compatibility.