+ 1
What is the code behind the built in function input() in python
4 Respostas
+ 4
Example:
(sys.stdin doesn't seem to work on SoloLearn).
https://code.sololearn.com/cRbUVq0hW44Q/?ref=app
+ 5
input is based on sys.stdin
print is based on sys.stdout
sys.stdin and sys.stdout behave like files.
Writing text on sys.stdout.write will write the text on screen.
sys.stdin.read will read the entered text.
+ 2
Sen TheS is correct but this doesn’t work here likely because python console in sololearn is read only
+ 2
Seb TheS and chernxbyl: Thank you very much for the answers