Condensing write.target lines into one?
<p>I'm learning python with "learning python the hard way", and I'm having trouble with <a href="http://learnpythonthehardway.org/book/ex16.html" rel="nofollow">exercise 16:</a> with the study drill. How do I convert the following six lines of code into one? :</p>

<pre><code>target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
</code></pre>

<p>I went on to try this:</p>

<pre><code>lines = line1,"\n",line2,"\n",line3,"\n"
target.write(lines)
</code></pre>

<p>But that didn't seem to work either, in terminal it said: 
expected a character buffer object</p>

<p>After referring to exercise 6 I then tried:</p>

<pre><code>lines = "%s\n%s\n%s\n" % line1,line2,line3
target.write(lines)
</code></pre>

<p>and it then says in the terminal "TypeError: not enough arguments for format string"</p>

<p>Also tried:</p>

<pre><code>target.write("%s,\n,%s,\n,%s,\n" % line1,line2,line3)
</code></pre>

<p>And got the same problem</p>
