If you are using the new versions of python -- 3.x.x -- then raw_input no longer exists. Use input(prompt) instead. It works pretty much the same. basic Syntax:
foo = input("some prompt").
What input does is it reads a line from the standard input file, or <stdin>
. It prints the prompt within the ()
and then waits for user input. Example: (>>>
is the command line prompt, <<<
is output
Command Line, interactive mode (or IDLE):
>>> foo = input("GIMME SOME INPUT: ") #tell it to take some input
<<<GIMME SOME INPUT: foo # it prints out, "GIMME SOME INPUT:" user types in foo
>>> print(foo)
<<< foo
Response to your edit:
Use this:
print ("CHOICE")
print ("A.Gimme the gun!")
print ("B.Fine")
choice = input("What do you choose?")
if choice == 'A' or choice == 'a':
#Some Action
if choice == 'B' or choice == 'b':
#Some Other Action