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
Try this:
import sys print sys.stdin.read().upper()
and check it with:
$ echo "Hello World" | python myFile.py