Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
extra credit - combined the 6 write() lines into 1
  • Loading branch information
mwarkentin committed Jan 9, 2011
1 parent 229b232 commit f545e57
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ex16.py
Expand Up @@ -22,12 +22,7 @@

print "I'm going to write these to the file."

target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
target.write("%s\n%s\n%s\n" % (line1, line2, line3))

print "And finally, we close it."
target.close()

0 comments on commit f545e57

Please sign in to comment.