changing response based on variable
<p>I'm trying to figure out how to use an if statement before the assignment to change it is made. The point of this script is to check if the knife is taken before it prompts with the question to take it from the table. It's to make it so that you can walk back to the table and get another response if you've already taken it. What am I doing wrong?</p>

<pre><code>def table ():
    if knife_taken == False:
        print "it's an old, brown wooden table, and atop it you find a knife"
        print "Will you take the knife or go back?"
        knife = raw_input ("&gt; ")
        if knife.strip().lower() in ["back", "b", "no"]:
            basement2()
        elif knife.strip().lower() in ["take knife", "knife", "yes", "k"]:
            knife_taken = True
            print "You now have the knife, good, you are going to need it"
            raw_input()
            basement2()
        else:
            print "I did not understand that."
            raw_input()
            table()
    else:
        print "There's nothing on the table"
    raw_input()
    basement2()
</code></pre>
