On Thu, Mar 26, 2009 at 2:58 PM, ALAN GAULD <alan.ga...@btinternet.com> wrote: > Use '\n'.join(handle[1:]) > It will create a string from your list with newline as separator.
The lines from readlines() include the newlines already. > When i use the following > > print>>out, handle[1:] > > In the out file, it saves the lines as a list rather than as a string. How > to avoid this. use out.writelines(handle[1:]) Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor