0
What is the difference between input and raw_input in python?
2 Réponses
0
"raw_input" is used in python 2.x and "input" is used in python 3.x versions.
0
(I think) if you use raw_input() python sees the data that is put in via this function as a string, but if you use input() python looks into the data that is put in and uses it as it is. So if you put in '123' with input() python does see this as an integer instead of a string.
these functions are written different in python 2 and 3. (the first ones are python 2)
raw_input() -> input()
input() -> eval(input())
hope you understand it now, and sorry for my vocabulary faults (i'm not an englishman)