Python input() and raw_input() function.
For python2
we have raw_input() function it will take different values from the user and return the output in the form of a string irrespective of the input values.
For example, this problem in python2 gives string.
Whereas the input() function in python2 will return the same value type as the user entered.
For Python3
The raw_input() function is not available for python3. The input() function in python3 is similar to the raw_input() function in python2. It means whatever type of data you input in python3 it will give you string as an output.
For example:
Here, we can see that if we input integer values in python3 using the input function it will give a string as an output. To get an integer as an output we have to use the int() function with the input() function.
Similarly, we have to use different functions with input function for getting different outputs types like float, list, etc.