On 2015-02-23 07:58, 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.

Using

  "".join(my_list[1:])

should work.

If it is an arbitrary iterable instead of a list (and thus can't be
sliced), you can use

  "".join(itertools.islice(my_iter, 1, None))

-tkc





-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to