List
Charl P. Botha
cpbotha at dutidad.twi.tudelft.nl
Sun Jun 2 16:01:00 EDT 2002
In article <3cfa7619_1 at news.iprimus.com.au>, Gold Fish wrote:
> Charl P. Botha wrote:
>
>> In article <3cfa6ed8_1 at news.iprimus.com.au>, Gold Fish wrote:
>>> Assume we got 2 list
>>> list 1 = ['ABC','CDG','DAV','FE','FECA','FEAFA','FEA']
>>> list 2 = []
>>> how can we copy element from list 1 to list 2 say i just want to copy the
>>> 3 element 'CDG','DAV','FE' to list2 only.
>>
>> list1 = ['ABC','CDG','DAV','FE','FECA','FEAFA','FEA']
>> list2 = list1[1:4]
>>
>> Is that what you meant?
>>
> No i mean if i got from list1 i wanna take 3 elements in any position to
> list2 but i don't know how many item in that list.
Could you rephrase that? The example I posted does exactly what your
example showed. Maybe if you gave another example and tried to explain more
clearly, I'd know what you were trying to do.
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the Python-list
mailing list