[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
Alan Gauld
alan.gauld at btinternet.com
Sat Oct 8 16:50:52 CEST 2011
On 08/10/11 11:27, Alan Gauld wrote:
> What you want, I think, is to join the original list
> with spaces(and maybe add a newline for writing to file)
>
> summary = ' '.join(summary) + \n
But you need to make the original items strings first
so it should be:
summary = ' '.join( map(str,summary) ) + \n
Sorry about that,
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list