The raw_input Function
Categories: Python
The raw_input([prompt]) function reads one line from standard input and returns it as a string (removing the trailing newline).
#!/usr/bin/python
str = raw_input("Enter your input: ")
print "Received input is : ", str
This prompts you to enter any string and it would display same string on the screen. When I typed "Hello Python!", its output is like this −
Enter your input: Hello Python
Received input is : Hello Python