list.join()... re.join()...? Do they exist? (newbie questions...)
Benji York
benji at benjiyork.com
Sat Oct 1 08:56:11 EDT 2005
googleboy wrote:
> To get it to work I did this:
>
>
> List[0] = list0
> List[1] = list1
> List[2] = list2
> List[3] = list3
> cat_list = list0 + '|' + flatblurb + '|' + flatcontents + '|' + flates
> + '\n'
> file.write(concat_list)
>
> But it seems to me that there is probably something more pythonic than
> having to go about it in such a laborious fashion....
Indeed. :)
cat_list = '|'.join(List)
--
Benji York
More information about the Python-list
mailing list