problem about list indexing

ZeD vito.detullio at gmail.com
Sun Nov 26 06:05:05 EST 2006


hollowspook wrote:

> how about indexing 1-7, 10
> [range(1:8),10] will generate [[1, 2, 3, 4, 5, 6, 7], 10], instead of
> [1, 2, 3, 4, 5, 6, 7, 10]

>>> range(1,8)+[10]
[1, 2, 3, 4, 5, 6, 7, 10]

-- 
Under construction



More information about the Python-list mailing list