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
I am pretty amazed no one had mentioned this hack so far:
python -c "import sys; set(map(sys.stdout.write,sys.stdin))"
in python2 you can drop the set() call, but it would word either way
set()