What is raw_input in Python
raw_input() function is similar to input() function. But you cannot use raw_input() in Python 3.x. Because this function is removed from Python 3.x versions. But it exists in Python 2.x.
raw_input() function takes string as input.
If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line from input, converts it to a string (removing a trailing newline), and returns that. When EOF is read,
EOFError is raised.
>>> s = raw_input('!!!') !!! Python Point >>> s "Python Point"
Reference: Official documentation
Please login to comment
View all comments