On Tue, Jan 12, 2010 at 1:16 AM, Alan Gauld wrote:
>
> "vishwajeet singh" wrote
>
> Thanks for your response but I am still not clear; can you show me the
>> equivalent of [::-1] in terms actually specifying start-index, end-index
>> which gives me reverse of the given arrary.
>>
>
> I don't th
"vishwajeet singh" wrote
Thanks for your response but I am still not clear; can you show me the
equivalent of [::-1] in terms actually specifying start-index, end-index
which gives me reverse of the given arrary.
I don't think you can, you must use the empty value.
In theory you could use
> > Hello All,
> >
> > I am bit confuse how the slice works in case a negative step is
supplied
> > a = 'abcde'
> > a[::-1] gives me edcba
> >
> > but [4:0:-1] gives me edcb
> >
> > while searching net I came accross something which said the
following:
> >
> > If a negative stride is specified and
On Mon, Jan 11, 2010 at 10:32 PM, spir wrote:
> On Mon, 11 Jan 2010 21:50:10 +0530
> vishwajeet singh wrote:
>
> > Hello All,
> >
> > I am bit confuse how the slice works in case a negative step is supplied
> > a = 'abcde'
> > a[::-1] gives me edcba
> >
> > but [4:0:-1] gives me edcb
> >
> > whi
On Mon, 11 Jan 2010 21:50:10 +0530
vishwajeet singh wrote:
> Hello All,
>
> I am bit confuse how the slice works in case a negative step is supplied
> a = 'abcde'
> a[::-1] gives me edcba
>
> but [4:0:-1] gives me edcb
>
> while searching net I came accross something which said the following:
Hello All,
I am bit confuse how the slice works in case a negative step is supplied
a = 'abcde'
a[::-1] gives me edcba
but [4:0:-1] gives me edcb
while searching net I came accross something which said the following:
If a negative stride is specified and the starting or stopping indices are
omi