Questions

Read the input till the end using python in competitive programming?

0

I am solving a competitive programming question where I need to take input till the end.

Input:

10100101111011111111
00000000000000000000
01011101110110101111
        .
        . 
        .
        .

I am not knowing how much input I have tot take.



asked 1 year, 11 months ago
Reputation: 1





1 Answer

0

We can take the input of this type using the below code.

from sys import stdin

for inp_line in stdin:
    print(inp_line)

This should work.

Thanks!!!

answered 1 year, 11 months ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  1 year, 11 months ago
Viewed:  448 times
Active:  1 year, 11 months ago