Next, we need to ask the user for input.
name = raw_input("What's your name?") print name
In the above example,
raw_input() accepts a string, prints it, and then waits for the user to type something and press Enter (or Return).
In the interpreter, Python will ask:
What's your name?
Once you type in your name and hit Enter, it will be stored in
On line 4, use
raw_input("Enter a word: ") to ask the user to enter a word. Save the results of
raw_input() in a variable called
Type a word in the console window and press Enter (or Return).