I was confused for the same reason like Lothar. One difference is that readline reads escape sequences, for example, a newline will also be saved in a variable. https://code.sololearn.com/ct832uf2Quf0/?ref=app Another difference is the arugment for input is used as the prompt message when readline takes an integer and reads that many characters from the input stream. But it probably is not what making the difference in you case.
Kabilan K , > input() function is to take an input from the user (done in the console) **: input can have a prompt to the user that is shown when input is executed. > readline() is a method of a file object (reading one line from a file that has been opend with open(<filename>, <filemode>)) **: no user prompt possible.
Kabilan K , it is always a good idea to share all required information with question... > stdin from sys module does also use method named readline()
Alex Wairegi Lochard codebit is correct. did you enter the inputs correctly? (the format that sololearn follows, providing all the inputs that a program needs on separate line)
Sandeep ooh I see my mistake😅😅
I see that you have completed a lot of courses. May I ask what have you confused? Because their use cases seem very different to me.
Alex Wairegi i think you should try again because it is not giving me any error. i am entering all three inputs on separate line
Yesterday i solved a coding challenge in that if i use the input () function one test case didn't get passed but the readline() get passed on all the test cases
Example 1: print(input()) Example 2: from sys import stdin print(stdin.readline())
Sandeep yes it gave me the EOF EXCEPTION
Lothar but in a coding challenge i just used it as " data=sys.stdin.readline() " so how here the function works
Lothar so how does that function get input from the user i mean until?