Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

matias stuff

1 2 3 4 5 6 7 8 9 10 11
infile = open('infile.txt', 'r')
content = infile.readlines() #reads line by line and out puts a list of each line
infile.close() #close the input template file
#here is where you change
content[1] = "foo \n" #replaces content of the 2nd line (index 1)
outfile = open('outfile.txt', 'w') #open up an output file
outfile.writelines(content) #write the content to the file
outfile.close() #close the file (not realllly necessary but good practice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.