#!/usr/bin/env python3
import sys
for line in sys.stdin:
print(line,end="",flush=True)
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Monday, June 20, 2016
Reading lines till eof from standard input
If you want to read lines from the standard input until End-Of-File (eof), you
can use the sys.stdin, for example:
Monday, April 4, 2016
Example codes in github
You can find all the code published in this blog in github, please visit https://github.com/astudillor/codes_python_blog. Feel free to use and modify this code.
Subscribe to:
Posts (Atom)