Re: [Tutor] Converting a List/Tuple to delimited string

2005-11-14 Thread Roy Bleasdale
would still recommend Learning Python. Message: 5 Date: Mon, 14 Nov 2005 17:11:16 +1300 From: John Fouhy <[EMAIL PROTECTED]> Subject: Re: [Tutor] Converting a List/Tuple to delimited string To: Tutor Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 On

Re: [Tutor] Converting a List/Tuple to delimited string

2005-11-13 Thread John Fouhy
On 14/11/05, Roy Bleasdale <[EMAIL PROTECTED]> wrote: > I have a list of strings and wanted to output them as a single delimited > string. > > Eg > > ('ab','cd','ef') becomes "ab:cd:ef" You almost had it ... What about: >>> lst = ['ab', 'cd', 'ef'] >>> ':'.join(lst) 'ab:cd:ef' In general, foo.j