Hallvard B Furuseth <h.b.furus...@usit.uio.no> writes:

> Jed Smith <j...@jedsmith.org> writes:
>>>>> a = [1, 2, 3, 4, 5, 6]
>>>>> a[::-1]
>> [6, 5, 4, 3, 2, 1]
>
> Nice.  Is there a trick to get a "-0" index too?
> Other than doing 'i or len(L)' instead of 'i', that is.
>
>>>> L = [1,2,3,4,5]
>>>> L[2:-2], L[2:-1], L[2:-0]  # not quite right:-)
> ([3], [3, 4], [])

'i or None'

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to