Ways to "reset" raw_input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gareth Roberts
    New Member
    • Jun 2011
    • 1

    Ways to "reset" raw_input

    Is there any way of "reseting" the raw_input so it is able to =a rather than =x and is there anything else that is wrong with it ?:P Im using python 2.7.2

    Code:
    x = raw_input ("enter name here: ")
    print "hello " +x
    print "how are you? Good or bad?"
    
    a=raw_input 
    
    if a == "good":
        print "awesome!"
    elif a== "bad":
        print "oh no"
    
    
    print " why you " + a +"?"
    
    raw_input("press <enter>")
    Last edited by bvdet; Jun 27 '11, 08:49 PM. Reason: Add code tags
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Line number 5 needs parentheses after raw_input for the function call.

    Comment

    Working...