Ask coding questions

← Back to all posts
1
python Stdin (Input) does not word
LevanKatsadze (0)

Hi, developers of repl it, please do something with the malfunctioning Stdin (Input). I can not space-separate words in the special input window (up-right). Also multi-line input just makes a whole bunch of fatal errors with the code that works perfectly on other IDEs. for example this simple code:

print(input())

And the output is:

Python 3.6.1 (default, Dec 2015, 13:05:11)
[GCC 4.8.2] on linux
line1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'line1' is not defined

line2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'line2' is not defined
line3line1
line1
line2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'line2' is not defined
line3
KeyboardInterrupt

Commentshotnewtop
1
CBlockSurprise (16)

Use raw_input instead of input.

1
LevanKatsadze (0)

@CBlockSurprise, that's not the case. raw_input is worse because it is for Python 2. Python 3 uses input.