How to get an input accept words and letters instead of just numbers

In Python 2.7, it can be extremely frustrating (at least for me) to have something such as

noun = input("Insert a noun: ")

and when you run the program, and error message shows up. This is because the input will only accept numbers. In order to have the input accept anything, so in this case letters (and even symbols), you must change the "input" to "raw_input" and all your problems will be fixed. So the fixed code from the following example will look like this:

noun = raw_input("Insert a noun: ")

Hope this helps anyone.

You are viewing a single comment. View All