string input from Python list
<p>i Want to make a very simple script that will do the following:</p>

<p>1- I have a List Named tries = ["First", "Second", "Last"]</p>

<p>2- I want the user will make an input string for each try</p>

<p>so I made script as below:</p>

<pre><code>print("You got 3 Guessing tries to guess What is My Name")

tries = ["First", "Second", "Last"]

for x in tries:
    Names = str(input(x,"Guess ?"))

    print(Names)
</code></pre>

<p>but it seems that Python doesn't accept this line: Names = str(input(x,"Guess ?"))</p>

<p>so any suggestions how to make the Questions to be appearing to the user as:  "First Guess?", then "Second Guess?", then "last guess?" </p>

<p>The <code>input</code> function takes only <strong>one</strong> arguments. Here, you give two to it.</p>

<p>I'm guessing that what you want to do is</p>

<pre><code>print("You got 3 Guessing tries to guess What is My Name")

tries = ["First", "Second", "Last"]

for x in tries:
    Names = str(input("{} Guess ?".format(x))) 

    print(Names)
</code></pre>

<p>If you want more about <code>format</code>: <a href="http://devdocs.io/python~3.5/library/functions#format" rel="nofollow">on devdocs</a></p>

<p>Matt</p>

python python-2.7 python-3.x