Python Print %s
<p>I've got a little Problem with my Python code.</p>

<pre><code>elif option in ['2','zwei','two']:
        packagelist = os.popen("adb -d shell pm list packages").read()
        print packagelist
        print " "
        package = parseInput(PACKAGE_QST)
        packagelist.index %package
        print ("Your package is: %s" %package)
        os.system("adb -d backup %s " %package)
</code></pre>

<p>I want that the user can paste the packagename into the input (option) and than it shall do "adb -d backup " 
But idk why it doesn't work. I searched pretty long in the internet for a solution, but haven't got one yet. </p>

<p>Im a noob and would appreciate your help so I can get better.</p>

<p>Thank you in advance!</p>

<p>You must pass a tuple when using <code>%</code>:</p>

<pre><code># notice how package is wrapped in ()
print ("Your package is: %s" % (package))
# and do the same when you call os.system()
os.system ("adb -d backup %s" % (package))
</code></pre>

python string adb