Skip to content

Instantly share code, notes, and snippets.

@hideshi
Created December 29, 2013 07:32
Show Gist options
  • Save hideshi/8168324 to your computer and use it in GitHub Desktop.
Save hideshi/8168324 to your computer and use it in GitHub Desktop.
Read from file and strip each lines and write to file.
import sys
if __name__ == '__main__':
with open(sys.argv[1]) as infile:
with open(sys.argv[2], 'w') as outfile:
for line in infile.readlines():
outfile.write(line.lstrip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment