code: def index(self, i):
          
          if self.count(i) == 0:
              raise ValueError("{} is not in range".format(i))
          return (i - self._start) // self._step
docs: xrangeobject.index(value, [start, [stop]]) -> integer --
          return index of value.
          Raise ValueError if the value is not present.