how to concatenate lists in python?
<p>I'm trying to insert a String into a list.</p>

<p>I got this error:</p>

<pre><code>TypeError: can only concatenate list (not "tuple") to list
</code></pre>

<p>because I tried this:</p>

<pre><code>var1 = 'ThisIsAString' # My string I want to insert in the following list
file_content = open('myfile.txt').readlines()
new_line_insert = file_content[:10] + list(var1) + rss_xml[11:]
open('myfile.txt', 'w').writelines(new_line_insert)
</code></pre>

<p>The content of myfile.txt is saved in "file_content" as a list.
I want to insert the String var1 after the 10th line, thats why I did</p>

<pre><code>file_content[:10] + list(var1) + rss_xml[11:]
</code></pre>

<p>but the list(var1) doesn't work. How can I make this code work?
Thanks!</p>
