Skip to content

Instantly share code, notes, and snippets.

@yuchan
Created June 10, 2014 10:44
Show Gist options
  • Select an option

  • Save yuchan/1f1ee9eed6d9801c71f1 to your computer and use it in GitHub Desktop.

Select an option

Save yuchan/1f1ee9eed6d9801c71f1 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
import sys
args = sys.argv
f = open("test.txt",'r+')
s = args[1]+"\n"
for l in f:
s += l
f.seek(0)
f.write(s)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment