I\'m trying to do some of the code golf challenges, but they all require the input to be taken from stdin. How do I get that in Python?
stdin
This will echo standard input to standard output:
import sys line = sys.stdin.readline() while line: print line, line = sys.stdin.readline()