+ 1

What is the code behind the built in function input() in python

3rd Jan 2020, 11:48 AM
Mostapha Amenchar
Mostapha Amenchar - avatar
4 Respostas
+ 4
Example: (sys.stdin doesn't seem to work on SoloLearn). https://code.sololearn.com/cRbUVq0hW44Q/?ref=app
3rd Jan 2020, 12:13 PM
Seb TheS
Seb TheS - avatar
+ 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.
3rd Jan 2020, 12:08 PM
Seb TheS
Seb TheS - avatar
+ 2
Sen TheS is correct but this doesn’t work here likely because python console in sololearn is read only
3rd Jan 2020, 5:57 PM
buckwillie05
buckwillie05 - avatar
+ 2
Seb TheS and chernxbyl: Thank you very much for the answers
4th Jan 2020, 1:50 AM
Mostapha Amenchar
Mostapha Amenchar - avatar