xrange is for supporting ancient versions of Python and large ranges.  `range(2)` is what you want here, I think.