Python: appending a variable to Popen
<p>When i try to carry out the code below i get the error "unsupported operand type(s) for %: 'list' and 'str'"</p>

<pre><code>from subprocess import Popen
z = '10000'
Popen(["formatdb", "-p", "T", "-i", "%s.txt"] % (z)).wait()
</code></pre>

<p>How would I insert my variable z into the name of my text file?</p>
