On Mon, 23 Feb 2015 07:58:39 -0800, loial wrote:

> Is there a quick way to concatenate all the values in a list into a
> string, except the first value?
> 
> I want this to work with variable length lists.
> 
> All values in list will be strings.
> 
> Any help appreciated

''.join(mylist[1:])

all elements must be strings (as specified) or it will cause an error




-- 
petribar:
        Any sun-bleached prehistoric candy that has been sitting in
        the window of a vending machine too long.
                -- Rich Hall, "Sniglets"
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to