On 4/12/06, Pujo Aji <[EMAIL PROTECTED]> wrote:
Hello,On 4/12/06, Kaushal Shriyan <[EMAIL PROTECTED] > 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 helpspujo
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor