-1

Here's my code in SublimeText

message = input ("Say something and I will repeat it : ")

print (message)

However, when I run it using SublimeREPL it returns that the input isn't defined unless I enter it with the customary string quotations. Is there anyway around it? I've read it may be because the interpreter is from python2? Any help.

hyper-neutrino
  • 5,272
  • 2
  • 29
  • 50

1 Answers1

1

What's the difference between raw_input() and input() in python3.x?

In Python 2, raw_input() returns a string, and input() tries to run the input as a Python expression. In Python 3, raw_input = input

So yes, the fact that the SublimeREPL interpreter is in Python2 is the cause. But you can use the Python 3.x interpreter in Sublime, look for it!

Adrien Logut
  • 812
  • 5
  • 13
  • Hello Adrien thanks for that I've been searching but so far no luck, could you point me in the right direction perhaps? – Fahad23rdKing Oct 04 '17 at 21:47
  • Depending on which plateform you are, it can differ. But everything is here: https://stackoverflow.com/questions/8551735/how-do-i-run-python-code-from-sublime-text-2 (see ppy answer) – Adrien Logut Oct 05 '17 at 01:02