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

That was fixed in python 3


@hg0428 I literally just started programming when I wrote that comment, so I was kinda dumb lol


I never even learned python 2.
I made a lot of dumb posts and videos when I started.