I've read with interest Understanding slicing and What does 'result[::-1]' mean?
>>> a = 'Python'
# a[start:stop:step] with start and stop inverted if stem < 1
>>> a[::-1]
'nohtyP'
I got that:
>>> a[::-1] == a[None:None:-1]
True
But I still asking to myself the following question:
Why I cant create with some default start
stop
values the equivalent of a[::-1]
?
>>> a[len(a):0:-1]
'nohty'
>>> a[len(a)+1:0:-1]
'nohty'
>>> a[len(a)+1:-1:-1]
''
Can I catch the P
of Python with explicit indices ?