how to clear up a List in python?

Damjan gdamjan at gmail.com
Thu May 25 12:20:57 EDT 2006


>> And, if a list have 801 values, I want to get its values index from 300
>> to 400, could use list1[300:400],are right me?
> 
> 300 will be included in your slice whereas the 400th index will be
> excluded. you will ultimately have 99 items in your slice.

No, he'll have 100 items in the slice... 300, 301,... 399 that's 100 items.

-- 
damjan



More information about the Python-list mailing list