How to you convert list of tuples to string

Larry Hudson orgnut at yahoo.com
Wed Nov 23 23:23:49 EST 2016


On 11/23/2016 03:09 AM, Ned Batchelder wrote:
[snip...]
>> Or using the new string formatting syntax:
>>
>> msg = '{},{},{}:{}'.format(*item)
>>
>> The *item in the format() unpacks the tuple.
>
>
> "new" == "Introduced in 2.6, available since 2008" :)
>
> --Ned.
>

Of course.  I probably should have said "newer" or "other".    :-)

-- 
      -=- Larry -=-



More information about the Python-list mailing list