By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,282 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

Ways to "reset" raw_input

P: 1
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

Expand|Select|Wrap|Line Numbers
  1. x = raw_input ("enter name here: ")
  2. print "hello " +x
  3. print "how are you? Good or bad?"
  4.  
  5. a=raw_input 
  6.  
  7. if a == "good":
  8.     print "awesome!"
  9. elif a== "bad":
  10.     print "oh no"
  11.  
  12.  
  13. print " why you " + a +"?"
  14.  
  15. raw_input("press <enter>")
Jun 27 '11 #1

✓ answered by bvdet

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

Share this Question
Share on Google+
1 Reply


bvdet
Expert Mod 2.5K+
P: 2,851
Line number 5 needs parentheses after raw_input for the function call.
Jun 27 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.