+ 2
Whats the difference between raw_input() and input() in Python 2 & 3?
4 Respuestas
+ 3
input() :interprets and evaluates the input which means that if user enters integer,an integer will be returned ,if user enters string,string is returned.
raw_input():raw_input() takes exactly what user typed and passes it back as string .It doesn’t interprets the user input.Even an integer value of 10 is entered or a list is entered its type will be of string only.
+ 7
Actually, input() always returns a string in Python 3, much like raw_input() does for Python 2.
+ 1
In Python 2, `input()` is equivalent to `eval(raw_input())`. In Python 3, `raw_input` was renamed to `input`, replacing the previous Python 2 function. Pretty much what @Dimanjan already said.