SV: Surprised by the command "del"

2008-03-01 Thread K Viltersten
>>I'm reading the docs and at 5.2 the del >>statement is discussed. At first, i thought >>i've found a typo but as i tried that >>myself, it turns it actually does work so. >> >> a = ["alpha", "beta", "gamma"] >> del a[2:2] >> a >> >>Now, i expected the result to be that the >>"beta" element ha

Re: Surprised by the command "del"

2008-03-01 Thread From
On Sat, 1 Mar 2008 21:05:41 +0100, "K Viltersten" <[EMAIL PROTECTED]> wrote: >I'm reading the docs and at 5.2 the del >statement is discussed. At first, i thought >i've found a typo but as i tried that >myself, it turns it actually does work so. > > a = ["alpha", "beta", "gamma"] > del a[2:2] >

SV: Surprised by the command "del"

2008-03-01 Thread K Viltersten
>> I'm reading the docs and at 5.2 the del >> statement is discussed. At first, i thought >> i've found a typo but as i tried that >> myself, it turns it actually does work so. >> >> a = ["alpha", "beta", "gamma"] >> del a[2:2] >> a >> >> Now, i expected the result to be that the >> "beta"

Re: Surprised by the command "del"

2008-03-01 Thread Steve Holden
K Viltersten wrote: > I'm reading the docs and at 5.2 the del > statement is discussed. At first, i thought > i've found a typo but as i tried that > myself, it turns it actually does work so. > > a = ["alpha", "beta", "gamma"] > del a[2:2] > a > > Now, i expected the result to be that the

Re: Surprised by the command "del"

2008-03-01 Thread castironpi
On Mar 1, 2:05 pm, "K Viltersten" <[EMAIL PROTECTED]> wrote: > I'm reading the docs and at 5.2 the del > statement is discussed. At first, i thought > i've found a typo but as i tried that > myself, it turns it actually does work so. > >   a = ["alpha", "beta", "gamma"] >   del a[2:2] >   a > > Now

Surprised by the command "del"

2008-03-01 Thread K Viltersten
I'm reading the docs and at 5.2 the del statement is discussed. At first, i thought i've found a typo but as i tried that myself, it turns it actually does work so. a = ["alpha", "beta", "gamma"] del a[2:2] a Now, i expected the result to be that the "beta" element has been removed. Obviou