R
R
Russian Federation2015-12-12 23:52:54
Python
Russian Federation, 2015-12-12 23:52:54

What is the difference between sys.stdin.readline() and input()?

I was sorting out the problem, and I stumbled upon
N = int(sys.stdin.readline())
What is bad about the usual one int(input())?
Task just in case link to task . Task at the end

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abcd0x00, 2015-12-13
@afydoz

What's wrong with regular int(input()) ?

Nothing. These are slightly different things, since input() takes a prompt string that must be printed before accepting a response - it's like print() + sys.stdin.readline().
In the context of the task, there is no difference.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question