-2

Are raw_input and input the same? Because when I am coding in python I cannot use raw_input it takes up some error.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

2 Answers2

1

In Python 2, raw_input() is used for input. Whereas in Python 3.x, you have input().

Maybe your python version is 3.x.

From http://docs.python.org/dev/py3k/whatsnew/3.0.html

Sreekanth Reddy Balne
  • 3,264
  • 1
  • 18
  • 44
-1

As this answer to this question mentions

the difference is that raw_input() does not exist in Python 3.x, while input() does. Actually, the old raw_input() has been renamed to input(), and the old input() is gone, but can easily be simulated by using eval(input()). (Remember that eval() is evil, so if try to use safer ways of parsing your input if possible.)

dstrants
  • 7,423
  • 2
  • 19
  • 27