Python String display
<p>I want to display whatever is in <em>line1</em> to <em>line3</em>, which are inputs from the user. So I assign it to variable <code>print_out</code> but don't know a way how to make it work so that when it write in a text-file it is endented with <code>\n</code>. What should I put in the string? </p>

<pre><code>line1 = raw_input("line 1: ")  #input from user and are store in line1
line2 = raw_input("line 2: ")  #input from user and are store in line2
line3 = raw_input("line 3: ") #input from user and are store in line3

print_out =    #here i want to assign line1-line 3 as string and assign it to variable print_out

txt.write(print_out) #will write whatever it is typed inside print_out on to a file
</code></pre>

<p>The question is, how do I assign stuff into <code>print_out</code>? I know a way how to do it, but that's more coding, so I want to use string to do it. The other way is:</p>

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

<p>But I want to use a string to display this, so I don't have to write so much. How do I do it so it display like that but using string instead of keep writing txt.write to enter new line. thanks.</p>
