Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    >>> xrange(13)[::-1]
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: sequence index must be integer, not 'slice'


  >>> list(range(13)[::-1]) == list(xrange(12, -1, -1))
  True




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: