I
I
iegor2016-05-11 15:04:17
Python
iegor, 2016-05-11 15:04:17

Similar to sys.stdin in Python2?

What in python 2 can replace this construction from python 3:

for line in sys.stdin:
    print(line)

Or only through while 1?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2016-05-11
@iegor

And what is the difficulty?

import sys
for line in sys.stdin:
    print line

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question