On 08/10/14 02:02, Phillip Pugh wrote:
with open("InputTest.txt","r") as f:
with open("Outputt.txt", "w") as fw:
for line in f:
first,second = line[:32], line[32:37]
if first.isspace()== False:
fw.write (second.strip()+ first.strip()+"\n")
f.close()
fw.close()
You don't need the close()s
the with construct does that for you automatically.
Alan G.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor