raw_input() is used only in Python2 while input() is used in Python 2.x as well as Python 3.x. Also, raw_input() always uses input data in string format, whereas input() tries to detect the type of data and automatically convert it to the required type. Though this property of input() only works in Python2.x, it is best to typecast the data before using it.