Starting with Python 3, raw_input() was renamed to input().
From Whatโs New In Python 3.0, Builtins section second item.
Answer from balpha on Stack Overflowraw_input function in Python - Stack Overflow
What's the difference between `raw_input()` and `input()` in Python 3? - Stack Overflow
Input and raw_input in python
How does raw_input and input work?
Videos
It presents a prompt to the user (the optional arg of raw_input([arg])), gets input from the user and returns the data input by the user in a string. See the docs for raw_input().
Example:
name = raw_input("What is your name? ")
print "Hello, %s." % name
This differs from input() in that the latter tries to interpret the input given by the user; it is usually best to avoid input() and to stick with raw_input() and custom parsing/conversion code.
Note: This is for Python 2.x
raw_input() was renamed to input() in Python 3.
From http://docs.python.org/dev/py3k/whatsnew/3.0.html
The difference is that raw_input() does not exist in Python 3.x, while input() does. Actually, the old raw_input() has been renamed to input(), and the old input() is gone, but can easily be simulated by using eval(input()). (Remember that eval() is evil. Try to use safer ways of parsing your input if possible.)
In Python 2, raw_input() returns a string, and input() tries to run the input as a Python expression.
Since getting a string was almost always what you wanted, Python 3 does that with input(). As Sven says, if you ever want the old behaviour, eval(input()) works.
Why this function input and raw_input takes string value in it first y can't it have integer instead y we need to do typecasting for that.
I have just started learning python programming, as in less then 24 hours ago, and don't understand what the difference between input and raw_input is. Also, what would I type in to see a result and what would that result mean?
I am new to programming and have just started...literally, any helps or tips are greatly appreciated!