[Tutor] Explanation of Lists data Type
Pujo Aji
ajikoe at gmail.com
Wed Apr 12 11:34:31 CEST 2006
Sorry for the last explanations....there is a correction!
On 4/12/06, Pujo Aji <ajikoe at gmail.com> wrote:
>
> Hello,
>
>
> On 4/12/06, Kaushal Shriyan <kaushalshriyan at gmail.com> wrote:
> >
> > Hi All
> >
> > I am referring to http://www.ibiblio.org/obp/thinkCSpy/chap08.htm
> >
> > 8.7 List slices
> > --------------------------------------------
> > >>> list = ['a', 'b', 'c', 'd', 'e', 'f']
> > >>> list[1:3]
> > ['b', 'c'] -----> I understood this
>
>
>
>
> >>> list[:4] --> Does this mean its list[0:4]
>
> ':' here means --> from the first element to element index 3 #
> corrected
>
> > ['a', 'b', 'c', 'd'] ----> I didnot understood this
>
>
>
>
> >>> list[3:] --> Does this mean its list[3:0]
>
> ':' here means --> from element index 3 to the last element
> ['d', 'e', 'f'] ----> I didnot understood this
>
>
>
> >>> list[:] --> Does this mean its list[0:0]
>
> ':' here means --> from the first element to the last element
>
> > ['a', 'b', 'c', 'd', 'e', 'f'] ----> I didnot understood this
>
>
>
>
> Please explain me
> >
> > Thanks in Advance
> >
> > Regards
> >
> > Kaushal
>
>
>
>
> Hope, this helps
> pujo
>
>
> _______________________________________________
> > Tutor maillist - Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060412/25042de8/attachment.htm
More information about the Tutor
mailing list