Re: Re: joining files
mannu jha
mannu_0523 at rediffmail.com
Mon May 17 15:35:51 EDT 2010
On Mon, 17 May 2010 23:57:18 +0530 wrote
>Try:
file = open("input11.txt")
file1 = file.read() # file1 is a string
file.close()
or
file1 = open("input11.txt") # file1 is an open file object
and replace lines:
for line in sce.split(os.linesep):
lst = line.split()
lines[lst[0]] = (nme, lst)
with lines:
for line in sce:
lst = line.split()
lines[lst[0]] = (nme, lst)
sce.close()
Thankyou very much sir it has worked. Thankyou once again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100517/49b0ce1c/attachment-0001.html>
More information about the Python-list
mailing list