Remove lines from a file: Difference between revisions

m
Fix Python solution [for case when the file does not ends with a newline] to prevent removing last character of the file
(Added Delphi example)
m (Fix Python solution [for case when the file does not ends with a newline] to prevent removing last character of the file)
Line 2,351:
pass
else:
print line[:-1].rstrip("\n")
fileinput.close()</lang>
 
1,481

edits