Concatenate list values

John Gordon gordon at panix.com
Mon Feb 23 11:07:02 EST 2015


In <12821378-62af-4954-8b61-aa0738c5ff5c at googlegroups.com> loial <jldunn2000 at gmail.com> writes:

> 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

big_string = ', '.join(my_list[1:])

-- 
John Gordon         Imagine what it must be like for a real medical doctor to
gordon at panix.com    watch 'House', or a real serial killer to watch 'Dexter'.




More information about the Python-list mailing list