Repl.it - select language


#1

// what’s the difference between [input()] & [raw_input()] ?
// which of the two is supported by py2 & py3 respectively ?


#2

python2 supports input and raw_input

python3 only supports input.

in python2, raw_input stores the result as string. This function was renamed to input in python3. in python2, input would evaluate the result as code, to get this behavior in python3 you need eval(input())


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.